@stryke/types 0.5.1 → 0.6.0
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/README.md +16 -14
- package/dist/{utility-types/array.d.ts → array.d.ts} +0 -12
- package/dist/{utility-types/async.d.ts → async.d.ts} +1 -11
- package/dist/{utility-types/base.d.ts → base.d.ts} +23 -31
- package/dist/index.cjs +181 -16
- package/dist/index.d.ts +19 -4
- package/dist/index.mjs +1 -1
- package/dist/{utility-types/json.d.ts → json.d.ts} +0 -10
- package/dist/{utility-types/number.d.ts → number.d.ts} +0 -22
- package/dist/{utility-types/object.d.ts → object.d.ts} +1 -15
- package/dist/{utility-types/package-json.d.ts → package-json.d.ts} +3 -5
- package/dist/{utility-types/string.d.ts → string.d.ts} +0 -12
- package/dist/{utility-types/tsconfig.d.ts → tsconfig.d.ts} +0 -2
- package/dist/{utility-types/utilities.d.ts → utilities.d.ts} +1 -1
- package/dist/validations.cjs +1 -0
- package/dist/validations.mjs +0 -0
- package/package.json +125 -987
- package/dist/convert/buffer-to-string.cjs +0 -8
- package/dist/convert/buffer-to-string.d.ts +0 -1
- package/dist/convert/buffer-to-string.mjs +0 -1
- package/dist/convert/index.cjs +0 -71
- package/dist/convert/index.d.ts +0 -6
- package/dist/convert/index.mjs +0 -1
- package/dist/convert/string-to-uint8-array.cjs +0 -8
- package/dist/convert/string-to-uint8-array.d.ts +0 -7
- package/dist/convert/string-to-uint8-array.mjs +0 -1
- package/dist/convert/to-array.cjs +0 -9
- package/dist/convert/to-array.d.ts +0 -8
- package/dist/convert/to-array.mjs +0 -1
- package/dist/convert/to-string-key.cjs +0 -9
- package/dist/convert/to-string-key.d.ts +0 -7
- package/dist/convert/to-string-key.mjs +0 -1
- package/dist/convert/uint8-array-to-string.cjs +0 -8
- package/dist/convert/uint8-array-to-string.d.ts +0 -13
- package/dist/convert/uint8-array-to-string.mjs +0 -1
- package/dist/convert/utf8-array-to-string.cjs +0 -8
- package/dist/convert/utf8-array-to-string.d.ts +0 -13
- package/dist/convert/utf8-array-to-string.mjs +0 -1
- package/dist/helpers/index.cjs +0 -16
- package/dist/helpers/index.d.ts +0 -1
- package/dist/helpers/index.mjs +0 -1
- package/dist/helpers/parse-type-definition.cjs +0 -33
- package/dist/helpers/parse-type-definition.d.ts +0 -8
- package/dist/helpers/parse-type-definition.mjs +0 -1
- package/dist/type-checks/get-object-tag.cjs +0 -8
- package/dist/type-checks/get-object-tag.d.ts +0 -7
- package/dist/type-checks/get-object-tag.mjs +0 -1
- package/dist/type-checks/index.cjs +0 -456
- package/dist/type-checks/index.d.ts +0 -41
- package/dist/type-checks/index.mjs +0 -1
- package/dist/type-checks/is-array-like.cjs +0 -11
- package/dist/type-checks/is-array-like.d.ts +0 -7
- package/dist/type-checks/is-array-like.mjs +0 -1
- package/dist/type-checks/is-async-iterable.cjs +0 -10
- package/dist/type-checks/is-async-iterable.d.ts +0 -7
- package/dist/type-checks/is-async-iterable.mjs +0 -1
- package/dist/type-checks/is-bigint.cjs +0 -9
- package/dist/type-checks/is-bigint.d.ts +0 -16
- package/dist/type-checks/is-bigint.mjs +0 -1
- package/dist/type-checks/is-boolean.cjs +0 -14
- package/dist/type-checks/is-boolean.d.ts +0 -7
- package/dist/type-checks/is-boolean.mjs +0 -1
- package/dist/type-checks/is-buffer.cjs +0 -10
- package/dist/type-checks/is-buffer.d.ts +0 -5
- package/dist/type-checks/is-buffer.mjs +0 -1
- package/dist/type-checks/is-collection.cjs +0 -11
- package/dist/type-checks/is-collection.d.ts +0 -8
- package/dist/type-checks/is-collection.mjs +0 -1
- package/dist/type-checks/is-date.cjs +0 -10
- package/dist/type-checks/is-date.d.ts +0 -16
- package/dist/type-checks/is-date.mjs +0 -1
- package/dist/type-checks/is-deep-key.cjs +0 -26
- package/dist/type-checks/is-deep-key.d.ts +0 -35
- package/dist/type-checks/is-deep-key.mjs +0 -1
- package/dist/type-checks/is-empty-object.cjs +0 -23
- package/dist/type-checks/is-empty-object.d.ts +0 -14
- package/dist/type-checks/is-empty-object.mjs +0 -1
- package/dist/type-checks/is-empty-string.cjs +0 -16
- package/dist/type-checks/is-empty-string.d.ts +0 -7
- package/dist/type-checks/is-empty-string.mjs +0 -1
- package/dist/type-checks/is-empty.cjs +0 -35
- package/dist/type-checks/is-empty.d.ts +0 -8
- package/dist/type-checks/is-empty.mjs +0 -1
- package/dist/type-checks/is-equal.cjs +0 -18
- package/dist/type-checks/is-equal.d.ts +0 -1
- package/dist/type-checks/is-equal.mjs +0 -1
- package/dist/type-checks/is-error.cjs +0 -15
- package/dist/type-checks/is-error.d.ts +0 -17
- package/dist/type-checks/is-error.mjs +0 -1
- package/dist/type-checks/is-file-result.cjs +0 -11
- package/dist/type-checks/is-file-result.d.ts +0 -8
- package/dist/type-checks/is-file-result.mjs +0 -1
- package/dist/type-checks/is-float.cjs +0 -9
- package/dist/type-checks/is-float.d.ts +0 -8
- package/dist/type-checks/is-float.mjs +0 -1
- package/dist/type-checks/is-function.cjs +0 -23
- package/dist/type-checks/is-function.d.ts +0 -10
- package/dist/type-checks/is-function.mjs +0 -1
- package/dist/type-checks/is-integer.cjs +0 -10
- package/dist/type-checks/is-integer.d.ts +0 -8
- package/dist/type-checks/is-integer.mjs +0 -1
- package/dist/type-checks/is-mergeable-object.cjs +0 -14
- package/dist/type-checks/is-mergeable-object.d.ts +0 -1
- package/dist/type-checks/is-mergeable-object.mjs +0 -1
- package/dist/type-checks/is-non-null-object.cjs +0 -10
- package/dist/type-checks/is-non-null-object.d.ts +0 -7
- package/dist/type-checks/is-non-null-object.mjs +0 -1
- package/dist/type-checks/is-not-empty.cjs +0 -17
- package/dist/type-checks/is-not-empty.d.ts +0 -7
- package/dist/type-checks/is-not-empty.mjs +0 -1
- package/dist/type-checks/is-null.cjs +0 -14
- package/dist/type-checks/is-null.d.ts +0 -1
- package/dist/type-checks/is-null.mjs +0 -1
- package/dist/type-checks/is-number.cjs +0 -19
- package/dist/type-checks/is-number.d.ts +0 -15
- package/dist/type-checks/is-number.mjs +0 -1
- package/dist/type-checks/is-object-index.cjs +0 -17
- package/dist/type-checks/is-object-index.d.ts +0 -7
- package/dist/type-checks/is-object-index.mjs +0 -1
- package/dist/type-checks/is-object.cjs +0 -30
- package/dist/type-checks/is-object.d.ts +0 -30
- package/dist/type-checks/is-object.mjs +0 -1
- package/dist/type-checks/is-plain-object.cjs +0 -17
- package/dist/type-checks/is-plain-object.d.ts +0 -50
- package/dist/type-checks/is-plain-object.mjs +0 -1
- package/dist/type-checks/is-primitive.cjs +0 -14
- package/dist/type-checks/is-primitive.d.ts +0 -1
- package/dist/type-checks/is-primitive.mjs +0 -1
- package/dist/type-checks/is-promise.cjs +0 -12
- package/dist/type-checks/is-promise.d.ts +0 -17
- package/dist/type-checks/is-promise.mjs +0 -1
- package/dist/type-checks/is-react-element.cjs +0 -8
- package/dist/type-checks/is-react-element.d.ts +0 -1
- package/dist/type-checks/is-react-element.mjs +0 -1
- package/dist/type-checks/is-ref.cjs +0 -14
- package/dist/type-checks/is-ref.d.ts +0 -8
- package/dist/type-checks/is-ref.mjs +0 -1
- package/dist/type-checks/is-regexp.cjs +0 -10
- package/dist/type-checks/is-regexp.d.ts +0 -16
- package/dist/type-checks/is-regexp.mjs +0 -1
- package/dist/type-checks/is-select-option.cjs +0 -15
- package/dist/type-checks/is-select-option.d.ts +0 -8
- package/dist/type-checks/is-select-option.mjs +0 -1
- package/dist/type-checks/is-set-object.cjs +0 -15
- package/dist/type-checks/is-set-object.d.ts +0 -7
- package/dist/type-checks/is-set-object.mjs +0 -1
- package/dist/type-checks/is-set-string.cjs +0 -16
- package/dist/type-checks/is-set-string.d.ts +0 -7
- package/dist/type-checks/is-set-string.mjs +0 -1
- package/dist/type-checks/is-set.cjs +0 -15
- package/dist/type-checks/is-set.d.ts +0 -7
- package/dist/type-checks/is-set.mjs +0 -1
- package/dist/type-checks/is-string.cjs +0 -14
- package/dist/type-checks/is-string.d.ts +0 -1
- package/dist/type-checks/is-string.mjs +0 -1
- package/dist/type-checks/is-symbol.cjs +0 -14
- package/dist/type-checks/is-symbol.d.ts +0 -1
- package/dist/type-checks/is-symbol.mjs +0 -1
- package/dist/type-checks/is-typed-array.cjs +0 -9
- package/dist/type-checks/is-typed-array.d.ts +0 -1
- package/dist/type-checks/is-typed-array.mjs +0 -1
- package/dist/type-checks/is-typed.cjs +0 -16
- package/dist/type-checks/is-typed.d.ts +0 -8
- package/dist/type-checks/is-typed.mjs +0 -1
- package/dist/type-checks/is-undefined.cjs +0 -8
- package/dist/type-checks/is-undefined.d.ts +0 -1
- package/dist/type-checks/is-undefined.mjs +0 -1
- package/dist/type-checks/property-exists.cjs +0 -17
- package/dist/type-checks/property-exists.d.ts +0 -16
- package/dist/type-checks/property-exists.mjs +0 -1
- package/dist/type-checks/type-detect.cjs +0 -38
- package/dist/type-checks/type-detect.d.ts +0 -1
- package/dist/type-checks/type-detect.mjs +0 -1
- package/dist/utility-types/array.cjs +0 -9
- package/dist/utility-types/array.mjs +0 -1
- package/dist/utility-types/index.cjs +0 -214
- package/dist/utility-types/index.d.ts +0 -19
- package/dist/utility-types/index.mjs +0 -1
- /package/dist/{utility-types/async.cjs → array.cjs} +0 -0
- /package/dist/{utility-types/async.mjs → array.mjs} +0 -0
- /package/dist/{utility-types/configuration.cjs → async.cjs} +0 -0
- /package/dist/{utility-types/configuration.mjs → async.mjs} +0 -0
- /package/dist/{utility-types/base.cjs → base.cjs} +0 -0
- /package/dist/{utility-types/base.mjs → base.mjs} +0 -0
- /package/dist/{utility-types/form.cjs → configuration.cjs} +0 -0
- /package/dist/{utility-types/configuration.d.ts → configuration.d.ts} +0 -0
- /package/dist/{utility-types/form.mjs → configuration.mjs} +0 -0
- /package/dist/{utility-types/file.cjs → file.cjs} +0 -0
- /package/dist/{utility-types/file.d.ts → file.d.ts} +0 -0
- /package/dist/{utility-types/file.mjs → file.mjs} +0 -0
- /package/dist/{utility-types/json.cjs → form.cjs} +0 -0
- /package/dist/{utility-types/form.d.ts → form.d.ts} +0 -0
- /package/dist/{utility-types/json.mjs → form.mjs} +0 -0
- /package/dist/{utility-types/logic.cjs → json.cjs} +0 -0
- /package/dist/{utility-types/logic.mjs → json.mjs} +0 -0
- /package/dist/{utility-types/navigator.cjs → logic.cjs} +0 -0
- /package/dist/{utility-types/logic.d.ts → logic.d.ts} +0 -0
- /package/dist/{utility-types/navigator.mjs → logic.mjs} +0 -0
- /package/dist/{utility-types/messages.cjs → messages.cjs} +0 -0
- /package/dist/{utility-types/messages.d.ts → messages.d.ts} +0 -0
- /package/dist/{utility-types/messages.mjs → messages.mjs} +0 -0
- /package/dist/{utility-types/number.cjs → navigator.cjs} +0 -0
- /package/dist/{utility-types/navigator.d.ts → navigator.d.ts} +0 -0
- /package/dist/{utility-types/number.mjs → navigator.mjs} +0 -0
- /package/dist/{utility-types/object.cjs → number.cjs} +0 -0
- /package/dist/{utility-types/object.mjs → number.mjs} +0 -0
- /package/dist/{utility-types/package-json.cjs → object.cjs} +0 -0
- /package/dist/{utility-types/package-json.mjs → object.mjs} +0 -0
- /package/dist/{utility-types/string.cjs → package-json.cjs} +0 -0
- /package/dist/{utility-types/string.mjs → package-json.mjs} +0 -0
- /package/dist/{utility-types/package-manager.cjs → package-manager.cjs} +0 -0
- /package/dist/{utility-types/package-manager.d.ts → package-manager.d.ts} +0 -0
- /package/dist/{utility-types/package-manager.mjs → package-manager.mjs} +0 -0
- /package/dist/{utility-types/system.cjs → string.cjs} +0 -0
- /package/dist/{utility-types/system.mjs → string.mjs} +0 -0
- /package/dist/{utility-types/tsconfig.cjs → system.cjs} +0 -0
- /package/dist/{utility-types/system.d.ts → system.d.ts} +0 -0
- /package/dist/{utility-types/tsconfig.mjs → system.mjs} +0 -0
- /package/dist/{utility-types/utilities.cjs → tsconfig.cjs} +0 -0
- /package/dist/{utility-types/utilities.mjs → tsconfig.mjs} +0 -0
- /package/dist/{utility-types/user.cjs → user.cjs} +0 -0
- /package/dist/{utility-types/user.d.ts → user.d.ts} +0 -0
- /package/dist/{utility-types/user.mjs → user.mjs} +0 -0
- /package/dist/{utility-types/validations.cjs → utilities.cjs} +0 -0
- /package/dist/{utility-types/validations.mjs → utilities.mjs} +0 -0
- /package/dist/{utility-types/validations.d.ts → validations.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const bufferToString: (buf: Buffer) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const bufferToString=t=>t.toString("utf8");
|
package/dist/convert/index.cjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _bufferToString = require("./buffer-to-string.cjs");
|
|
7
|
-
Object.keys(_bufferToString).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _bufferToString[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _bufferToString[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _stringToUint8Array = require("./string-to-uint8-array.cjs");
|
|
18
|
-
Object.keys(_stringToUint8Array).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _stringToUint8Array[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _stringToUint8Array[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _toArray = require("./to-array.cjs");
|
|
29
|
-
Object.keys(_toArray).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _toArray[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _toArray[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _toStringKey = require("./to-string-key.cjs");
|
|
40
|
-
Object.keys(_toStringKey).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _toStringKey[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _toStringKey[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _uint8ArrayToString = require("./uint8-array-to-string.cjs");
|
|
51
|
-
Object.keys(_uint8ArrayToString).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _uint8ArrayToString[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _uint8ArrayToString[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _utf8ArrayToString = require("./utf8-array-to-string.cjs");
|
|
62
|
-
Object.keys(_utf8ArrayToString).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _utf8ArrayToString[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _utf8ArrayToString[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
package/dist/convert/index.d.ts
DELETED
package/dist/convert/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./buffer-to-string";export*from"./string-to-uint8-array";export*from"./to-array";export*from"./to-string-key";export*from"./uint8-array-to-string";export*from"./utf8-array-to-string";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.stringToUint8Array = void 0;
|
|
7
|
-
const stringToUint8Array = n => Uint8Array.from([...encodeURIComponent(n)].map(r => r.codePointAt(0)));
|
|
8
|
-
exports.stringToUint8Array = stringToUint8Array;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const stringToUint8Array=n=>Uint8Array.from([...encodeURIComponent(n)].map(r=>r.codePointAt(0)));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Arrayable } from "../utility-types/array";
|
|
2
|
-
import type { Nullable } from "../utility-types/utilities";
|
|
3
|
-
/**
|
|
4
|
-
* Convert `Arrayable<T>` to `Array<T>`
|
|
5
|
-
*
|
|
6
|
-
* @category Array
|
|
7
|
-
*/
|
|
8
|
-
export declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function toArray(t){return t=t??[],Array.isArray(t)?t:[t]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function toStringKey(t){return Object.is(t,-0)?"-0":t.toString()}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a utf8 array to string
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* This method is part of the {@linkcode Convert} namespace.
|
|
6
|
-
*
|
|
7
|
-
* @credits https://stackoverflow.com/a/41798356/1465919
|
|
8
|
-
* @credits https://stackoverflow.com/a/36949791/1465919
|
|
9
|
-
*
|
|
10
|
-
* @param array - Utf-8 Array
|
|
11
|
-
* @returns The converted string
|
|
12
|
-
*/
|
|
13
|
-
export declare const uint8ArrayToString: (arr: Uint8Array) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const uint8ArrayToString=r=>decodeURIComponent(Buffer.from(r).toString("utf8"));
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert a utf8 array to string
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* This method is part of the {@linkcode Convert} namespace.
|
|
6
|
-
*
|
|
7
|
-
* @credits https://stackoverflow.com/a/41798356/1465919
|
|
8
|
-
* @credits https://stackoverflow.com/a/36949791/1465919
|
|
9
|
-
*
|
|
10
|
-
* @param array - Utf-8 Array
|
|
11
|
-
* @returns The converted string
|
|
12
|
-
*/
|
|
13
|
-
export declare const utf8ArrayToString: (array: Uint8Array) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const utf8ArrayToString=r=>new TextDecoder().decode(r);
|
package/dist/helpers/index.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _parseTypeDefinition = require("./parse-type-definition.cjs");
|
|
7
|
-
Object.keys(_parseTypeDefinition).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _parseTypeDefinition[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _parseTypeDefinition[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
package/dist/helpers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./parse-type-definition";
|
package/dist/helpers/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export*from"./parse-type-definition";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parseTypeDefinition = void 0;
|
|
7
|
-
var _typeChecks = require("../type-checks/index.cjs");
|
|
8
|
-
const parseTypeDefinition = e => {
|
|
9
|
-
if ((0, _typeChecks.isString)(e)) {
|
|
10
|
-
if (e.includes(":")) {
|
|
11
|
-
const i = e.split(":");
|
|
12
|
-
if (i.length > 1 && i[0]) return {
|
|
13
|
-
file: i[0],
|
|
14
|
-
name: i[1]
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
if (e.includes("#")) {
|
|
18
|
-
const i = e.split("#");
|
|
19
|
-
if (i.length > 1 && i[0]) return {
|
|
20
|
-
file: i[0],
|
|
21
|
-
name: i[1]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
file: e
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
if ((0, _typeChecks.isObject)(e)) return {
|
|
29
|
-
file: e.file,
|
|
30
|
-
name: e.name
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
exports.parseTypeDefinition = parseTypeDefinition;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TypeDefinition, TypeDefinitionParameter } from "../utility-types/configuration";
|
|
2
|
-
/**
|
|
3
|
-
* Parse a type definition parameter into a {@link TypeDefinition} object
|
|
4
|
-
*
|
|
5
|
-
* @param param - The parameter to parse
|
|
6
|
-
* @returns The parsed type definition
|
|
7
|
-
*/
|
|
8
|
-
export declare const parseTypeDefinition: (param: TypeDefinitionParameter) => TypeDefinition | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isObject as n,isString as t}from"../type-checks";export const parseTypeDefinition=e=>{if(t(e)){if(e.includes(":")){const i=e.split(":");if(i.length>1&&i[0])return{file:i[0],name:i[1]}}if(e.includes("#")){const i=e.split("#");if(i.length>1&&i[0])return{file:i[0],name:i[1]}}return{file:e}}if(n(e))return{file:e.file,name:e.name}};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getObjectTag = void 0;
|
|
7
|
-
const getObjectTag = t => t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
8
|
-
exports.getObjectTag = getObjectTag;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const getObjectTag=t=>t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t);
|