@codeleap/types 7.0.0 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/appSettings.js +3 -0
- package/dist/appSettings.js.map +1 -0
- package/dist/common.js +3 -0
- package/dist/common.js.map +1 -0
- package/dist/google-places.js +3 -0
- package/dist/google-places.js.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/pathMapping.js +3 -0
- package/dist/pathMapping.js.map +1 -0
- package/dist/react-native-masked-text.js +3 -0
- package/dist/react-native-masked-text.js.map +1 -0
- package/dist/typeGuards.js +74 -0
- package/dist/typeGuards.js.map +1 -0
- package/dist/utility.js +3 -0
- package/dist/utility.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appSettings.js","sourceRoot":"","sources":["../src/appSettings.ts"],"names":[],"mappings":""}
|
package/dist/common.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-places.js","sourceRoot":"","sources":["../src/google-places.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.RNMaskedTextTypes = exports.TypeGuards = void 0;
|
|
40
|
+
__exportStar(require("./google-places"), exports);
|
|
41
|
+
__exportStar(require("./pathMapping"), exports);
|
|
42
|
+
__exportStar(require("./utility"), exports);
|
|
43
|
+
__exportStar(require("./common"), exports);
|
|
44
|
+
exports.TypeGuards = __importStar(require("./typeGuards"));
|
|
45
|
+
__exportStar(require("./appSettings"), exports);
|
|
46
|
+
exports.RNMaskedTextTypes = __importStar(require("./react-native-masked-text"));
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,gDAA6B;AAC7B,4CAAyB;AACzB,2CAAwB;AACxB,2DAA0C;AAC1C,gDAA6B;AAC7B,gFAA+D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathMapping.js","sourceRoot":"","sources":["../src/pathMapping.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-native-masked-text.js","sourceRoot":"","sources":["../src/react-native-masked-text.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isNumber = isNumber;
|
|
7
|
+
exports.isString = isString;
|
|
8
|
+
exports.isObject = isObject;
|
|
9
|
+
exports.isBoolean = isBoolean;
|
|
10
|
+
exports.isFunction = isFunction;
|
|
11
|
+
exports.isConstructor = isConstructor;
|
|
12
|
+
exports.isArray = isArray;
|
|
13
|
+
exports.isUndefined = isUndefined;
|
|
14
|
+
exports.isNull = isNull;
|
|
15
|
+
exports.isNil = isNil;
|
|
16
|
+
exports.is = is;
|
|
17
|
+
exports.isInstance = isInstance;
|
|
18
|
+
exports.isElement = isElement;
|
|
19
|
+
exports.isComponentOrElement = isComponentOrElement;
|
|
20
|
+
exports.isPromise = isPromise;
|
|
21
|
+
const react_1 = __importDefault(require("react"));
|
|
22
|
+
function isNumber(x) {
|
|
23
|
+
return typeof x === 'number';
|
|
24
|
+
}
|
|
25
|
+
function isString(x) {
|
|
26
|
+
return typeof x === 'string';
|
|
27
|
+
}
|
|
28
|
+
/** Returns `true` for any value whose `typeof` is `'object'`, including `null`. Pair with `isNil` when null must be excluded. */
|
|
29
|
+
function isObject(x) {
|
|
30
|
+
return typeof x === 'object';
|
|
31
|
+
}
|
|
32
|
+
function isBoolean(x) {
|
|
33
|
+
return typeof x === 'boolean';
|
|
34
|
+
}
|
|
35
|
+
function isFunction(x) {
|
|
36
|
+
return typeof x === 'function';
|
|
37
|
+
}
|
|
38
|
+
/** Checks callable shape only — does not distinguish between regular functions and class constructors. Use `isConstructor` when the `new` signature matters. */
|
|
39
|
+
function isConstructor(x) {
|
|
40
|
+
return typeof x === 'function';
|
|
41
|
+
}
|
|
42
|
+
function isArray(x) {
|
|
43
|
+
return Array.isArray(x);
|
|
44
|
+
}
|
|
45
|
+
function isUndefined(x) {
|
|
46
|
+
return typeof x === 'undefined';
|
|
47
|
+
}
|
|
48
|
+
function isNull(x) {
|
|
49
|
+
return x === null;
|
|
50
|
+
}
|
|
51
|
+
function isNil(x) {
|
|
52
|
+
return isNull(x) || isUndefined(x);
|
|
53
|
+
}
|
|
54
|
+
/** Checks membership of `x` in the `Enum` array — useful for narrowing to a specific string/number literal union at runtime. */
|
|
55
|
+
function is(x, Enum) {
|
|
56
|
+
return Enum.includes(x);
|
|
57
|
+
}
|
|
58
|
+
/** Works for both concrete classes and abstract classes via the `Abstract<T>` branch. */
|
|
59
|
+
function isInstance(x, cls) {
|
|
60
|
+
return x instanceof cls;
|
|
61
|
+
}
|
|
62
|
+
/** Delegates to `React.isValidElement` — returns `true` for JSX elements but `false` for plain components (functions/classes). */
|
|
63
|
+
function isElement(x) {
|
|
64
|
+
return react_1.default.isValidElement(x);
|
|
65
|
+
}
|
|
66
|
+
/** Accepts both a component type (function/class) and a rendered element — use when a prop can receive either form. */
|
|
67
|
+
function isComponentOrElement(x) {
|
|
68
|
+
return isFunction(x) || isElement(x);
|
|
69
|
+
}
|
|
70
|
+
/** Duck-types against `.then` and `.catch` rather than `instanceof Promise`, so it works across realms and custom thenables. */
|
|
71
|
+
function isPromise(x) {
|
|
72
|
+
return isFunction(x === null || x === void 0 ? void 0 : x.then) && isFunction(x === null || x === void 0 ? void 0 : x.catch);
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=typeGuards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../src/typeGuards.ts"],"names":[],"mappings":";;;;;AAGA,4BAEC;AAED,4BAEC;AAGD,4BAEC;AAED,8BAEC;AAED,gCAEC;AAGD,sCAEC;AAED,0BAEC;AAED,kCAEC;AAED,wBAEC;AAED,sBAEC;AAGD,gBAEC;AAOD,gCAEC;AAGD,8BAEC;AAGD,oDAEC;AAGD,8BAEC;AAvED,kDAAyB;AAEzB,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,iIAAiI;AACjI,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,OAAO,CAAC,KAAK,SAAS,CAAA;AAC/B,CAAC;AAED,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,OAAO,CAAC,KAAK,UAAU,CAAA;AAChC,CAAC;AAED,gKAAgK;AAChK,SAAgB,aAAa,CAAC,CAAU;IACtC,OAAO,OAAO,CAAC,KAAK,UAAU,CAAA;AAChC,CAAC;AAED,SAAgB,OAAO,CAAC,CAAU;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AACzB,CAAC;AAED,SAAgB,WAAW,CAAC,CAAU;IACpC,OAAO,OAAO,CAAC,KAAK,WAAW,CAAA;AACjC,CAAC;AAED,SAAgB,MAAM,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,CAAA;AACnB,CAAC;AAED,SAAgB,KAAK,CAAC,CAAU;IAC9B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AACpC,CAAC;AAED,gIAAgI;AAChI,SAAgB,EAAE,CAAK,CAAU,EAAE,IAAS;IAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAM,CAAC,CAAA;AAC9B,CAAC;AAMD,yFAAyF;AACzF,SAAgB,UAAU,CAA4D,CAAU,EAAE,GAAM;IACtG,OAAO,CAAC,YAAa,GAAsB,CAAA;AAC7C,CAAC;AAED,kIAAkI;AAClI,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,eAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC;AAED,uHAAuH;AACvH,SAAgB,oBAAoB,CAAI,CAAM;IAC5C,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AACtC,CAAC;AAED,gIAAgI;AAChI,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,UAAU,CAAE,CAAS,aAAT,CAAC,uBAAD,CAAC,CAAU,IAAI,CAAC,IAAI,UAAU,CAAE,CAAS,aAAT,CAAC,uBAAD,CAAC,CAAU,KAAK,CAAC,CAAA;AACtE,CAAC"}
|
package/dist/utility.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../src/utility.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/types",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"main": "
|
|
3
|
+
"version": "7.0.2",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"directory": "packages/types"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@codeleap/config": "7.0.
|
|
25
|
+
"@codeleap/config": "7.0.1",
|
|
26
26
|
"ts-node-dev": "1.1.8"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|