@codeleap/types 7.0.2 → 7.1.1
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 +1 -2
- package/dist/common.js +1 -2
- package/dist/google-places.js +1 -2
- package/dist/index.js +7 -46
- package/dist/index.js.map +1 -1
- package/dist/pathMapping.js +1 -2
- package/dist/react-native-masked-text.js +1 -2
- package/dist/typeGuards.js +18 -38
- package/dist/typeGuards.js.map +1 -1
- package/dist/utility.js +1 -2
- package/package.json +2 -2
package/dist/appSettings.js
CHANGED
package/dist/common.js
CHANGED
package/dist/google-places.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,47 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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"));
|
|
1
|
+
export * from './google-places';
|
|
2
|
+
export * from './pathMapping';
|
|
3
|
+
export * from './utility';
|
|
4
|
+
export * from './common';
|
|
5
|
+
export * as TypeGuards from './typeGuards';
|
|
6
|
+
export * from './appSettings';
|
|
7
|
+
export * as RNMaskedTextTypes from './react-native-masked-text';
|
|
47
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA"}
|
package/dist/pathMapping.js
CHANGED
package/dist/typeGuards.js
CHANGED
|
@@ -1,74 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export function isNumber(x) {
|
|
23
3
|
return typeof x === 'number';
|
|
24
4
|
}
|
|
25
|
-
function isString(x) {
|
|
5
|
+
export function isString(x) {
|
|
26
6
|
return typeof x === 'string';
|
|
27
7
|
}
|
|
28
8
|
/** Returns `true` for any value whose `typeof` is `'object'`, including `null`. Pair with `isNil` when null must be excluded. */
|
|
29
|
-
function isObject(x) {
|
|
9
|
+
export function isObject(x) {
|
|
30
10
|
return typeof x === 'object';
|
|
31
11
|
}
|
|
32
|
-
function isBoolean(x) {
|
|
12
|
+
export function isBoolean(x) {
|
|
33
13
|
return typeof x === 'boolean';
|
|
34
14
|
}
|
|
35
|
-
function isFunction(x) {
|
|
15
|
+
export function isFunction(x) {
|
|
36
16
|
return typeof x === 'function';
|
|
37
17
|
}
|
|
38
18
|
/** Checks callable shape only — does not distinguish between regular functions and class constructors. Use `isConstructor` when the `new` signature matters. */
|
|
39
|
-
function isConstructor(x) {
|
|
19
|
+
export function isConstructor(x) {
|
|
40
20
|
return typeof x === 'function';
|
|
41
21
|
}
|
|
42
|
-
function isArray(x) {
|
|
22
|
+
export function isArray(x) {
|
|
43
23
|
return Array.isArray(x);
|
|
44
24
|
}
|
|
45
|
-
function isUndefined(x) {
|
|
25
|
+
export function isUndefined(x) {
|
|
46
26
|
return typeof x === 'undefined';
|
|
47
27
|
}
|
|
48
|
-
function isNull(x) {
|
|
28
|
+
export function isNull(x) {
|
|
49
29
|
return x === null;
|
|
50
30
|
}
|
|
51
|
-
function isNil(x) {
|
|
31
|
+
export function isNil(x) {
|
|
52
32
|
return isNull(x) || isUndefined(x);
|
|
53
33
|
}
|
|
54
34
|
/** 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) {
|
|
35
|
+
export function is(x, Enum) {
|
|
56
36
|
return Enum.includes(x);
|
|
57
37
|
}
|
|
58
38
|
/** Works for both concrete classes and abstract classes via the `Abstract<T>` branch. */
|
|
59
|
-
function isInstance(x, cls) {
|
|
39
|
+
export function isInstance(x, cls) {
|
|
60
40
|
return x instanceof cls;
|
|
61
41
|
}
|
|
62
42
|
/** Delegates to `React.isValidElement` — returns `true` for JSX elements but `false` for plain components (functions/classes). */
|
|
63
|
-
function isElement(x) {
|
|
64
|
-
return
|
|
43
|
+
export function isElement(x) {
|
|
44
|
+
return React.isValidElement(x);
|
|
65
45
|
}
|
|
66
46
|
/** Accepts both a component type (function/class) and a rendered element — use when a prop can receive either form. */
|
|
67
|
-
function isComponentOrElement(x) {
|
|
47
|
+
export function isComponentOrElement(x) {
|
|
68
48
|
return isFunction(x) || isElement(x);
|
|
69
49
|
}
|
|
70
50
|
/** 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
|
|
51
|
+
export function isPromise(x) {
|
|
52
|
+
return isFunction(x?.then) && isFunction(x?.catch);
|
|
73
53
|
}
|
|
74
54
|
//# sourceMappingURL=typeGuards.js.map
|
package/dist/typeGuards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../src/typeGuards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../src/typeGuards.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,iIAAiI;AACjI,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,CAAU;IAClC,OAAO,OAAO,CAAC,KAAK,SAAS,CAAA;AAC/B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,CAAU;IACnC,OAAO,OAAO,CAAC,KAAK,UAAU,CAAA;AAChC,CAAC;AAED,gKAAgK;AAChK,MAAM,UAAU,aAAa,CAAC,CAAU;IACtC,OAAO,OAAO,CAAC,KAAK,UAAU,CAAA;AAChC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,CAAU;IAChC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AACzB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAU;IACpC,OAAO,OAAO,CAAC,KAAK,WAAW,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,CAAA;AACnB,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,CAAU;IAC9B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AACpC,CAAC;AAED,gIAAgI;AAChI,MAAM,UAAU,EAAE,CAAK,CAAU,EAAE,IAAS;IAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAM,CAAC,CAAA;AAC9B,CAAC;AAMD,yFAAyF;AACzF,MAAM,UAAU,UAAU,CAA4D,CAAU,EAAE,GAAM;IACtG,OAAO,CAAC,YAAa,GAAsB,CAAA;AAC7C,CAAC;AAED,kIAAkI;AAClI,MAAM,UAAU,SAAS,CAAC,CAAU;IAClC,OAAO,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC;AAED,uHAAuH;AACvH,MAAM,UAAU,oBAAoB,CAAI,CAAM;IAC5C,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AACtC,CAAC;AAED,gIAAgI;AAChI,MAAM,UAAU,SAAS,CAAC,CAAU;IAClC,OAAO,UAAU,CAAE,CAAS,EAAE,IAAI,CAAC,IAAI,UAAU,CAAE,CAAS,EAAE,KAAK,CAAC,CAAA;AACtE,CAAC"}
|
package/dist/utility.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/types",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"directory": "packages/types"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@codeleap/config": "7.0.
|
|
25
|
+
"@codeleap/config": "7.0.2",
|
|
26
26
|
"ts-node-dev": "1.1.8"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|