full-utils 1.0.10 → 2.0.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 +189 -1
- package/dist/index.cjs +1039 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4495 -0
- package/dist/index.d.ts +4495 -48
- package/dist/index.js +977 -97
- package/dist/index.js.map +1 -1
- package/package.json +64 -18
- package/dist/src/from/fromJSON.d.ts +0 -5
- package/dist/src/from/fromJSON.js +0 -71
- package/dist/src/from/fromJSON.js.map +0 -1
- package/dist/src/from/fromTimestamp.d.ts +0 -6
- package/dist/src/from/fromTimestamp.js +0 -8
- package/dist/src/from/fromTimestamp.js.map +0 -1
- package/dist/src/index.d.ts +0 -48
- package/dist/src/index.js +0 -98
- package/dist/src/index.js.map +0 -1
- package/dist/src/is/isArr.d.ts +0 -1
- package/dist/src/is/isArr.js +0 -7
- package/dist/src/is/isArr.js.map +0 -1
- package/dist/src/is/isArrFilled.d.ts +0 -1
- package/dist/src/is/isArrFilled.js +0 -8
- package/dist/src/is/isArrFilled.js.map +0 -1
- package/dist/src/is/isBool.d.ts +0 -1
- package/dist/src/is/isBool.js +0 -7
- package/dist/src/is/isBool.js.map +0 -1
- package/dist/src/is/isDate.d.ts +0 -1
- package/dist/src/is/isDate.js +0 -16
- package/dist/src/is/isDate.js.map +0 -1
- package/dist/src/is/isEmail.d.ts +0 -1
- package/dist/src/is/isEmail.js +0 -9
- package/dist/src/is/isEmail.js.map +0 -1
- package/dist/src/is/isExists.d.ts +0 -1
- package/dist/src/is/isExists.js +0 -7
- package/dist/src/is/isExists.js.map +0 -1
- package/dist/src/is/isFunc.d.ts +0 -1
- package/dist/src/is/isFunc.js +0 -7
- package/dist/src/is/isFunc.js.map +0 -1
- package/dist/src/is/isIp.d.ts +0 -1
- package/dist/src/is/isIp.js +0 -13
- package/dist/src/is/isIp.js.map +0 -1
- package/dist/src/is/isMac.d.ts +0 -1
- package/dist/src/is/isMac.js +0 -8
- package/dist/src/is/isMac.js.map +0 -1
- package/dist/src/is/isNum.d.ts +0 -1
- package/dist/src/is/isNum.js +0 -7
- package/dist/src/is/isNum.js.map +0 -1
- package/dist/src/is/isNumFloat.d.ts +0 -1
- package/dist/src/is/isNumFloat.js +0 -8
- package/dist/src/is/isNumFloat.js.map +0 -1
- package/dist/src/is/isNumN.d.ts +0 -1
- package/dist/src/is/isNumN.js +0 -8
- package/dist/src/is/isNumN.js.map +0 -1
- package/dist/src/is/isNumNZ.d.ts +0 -1
- package/dist/src/is/isNumNZ.js +0 -8
- package/dist/src/is/isNumNZ.js.map +0 -1
- package/dist/src/is/isNumP.d.ts +0 -1
- package/dist/src/is/isNumP.js +0 -8
- package/dist/src/is/isNumP.js.map +0 -1
- package/dist/src/is/isNumPZ.d.ts +0 -1
- package/dist/src/is/isNumPZ.js +0 -8
- package/dist/src/is/isNumPZ.js.map +0 -1
- package/dist/src/is/isObj.d.ts +0 -1
- package/dist/src/is/isObj.js +0 -10
- package/dist/src/is/isObj.js.map +0 -1
- package/dist/src/is/isObjFilled.d.ts +0 -1
- package/dist/src/is/isObjFilled.js +0 -8
- package/dist/src/is/isObjFilled.js.map +0 -1
- package/dist/src/is/isPassword.d.ts +0 -10
- package/dist/src/is/isPassword.js +0 -26
- package/dist/src/is/isPassword.js.map +0 -1
- package/dist/src/is/isPhone.d.ts +0 -1
- package/dist/src/is/isPhone.js +0 -35
- package/dist/src/is/isPhone.js.map +0 -1
- package/dist/src/is/isStr.d.ts +0 -1
- package/dist/src/is/isStr.js +0 -7
- package/dist/src/is/isStr.js.map +0 -1
- package/dist/src/is/isStrBool.d.ts +0 -1
- package/dist/src/is/isStrBool.js +0 -12
- package/dist/src/is/isStrBool.js.map +0 -1
- package/dist/src/is/isStrFilled.d.ts +0 -1
- package/dist/src/is/isStrFilled.js +0 -8
- package/dist/src/is/isStrFilled.js.map +0 -1
- package/dist/src/is/isStrOrderType.d.ts +0 -1
- package/dist/src/is/isStrOrderType.js +0 -12
- package/dist/src/is/isStrOrderType.js.map +0 -1
- package/dist/src/is/isVar.d.ts +0 -1
- package/dist/src/is/isVar.js +0 -8
- package/dist/src/is/isVar.js.map +0 -1
- package/dist/src/net/netTCP.d.ts +0 -6
- package/dist/src/net/netTCP.js +0 -52
- package/dist/src/net/netTCP.js.map +0 -1
- package/dist/src/to/toArrFuncArgs.d.ts +0 -1
- package/dist/src/to/toArrFuncArgs.js +0 -139
- package/dist/src/to/toArrFuncArgs.js.map +0 -1
- package/dist/src/to/toBool.d.ts +0 -1
- package/dist/src/to/toBool.js +0 -23
- package/dist/src/to/toBool.js.map +0 -1
- package/dist/src/to/toCellDate.d.ts +0 -1
- package/dist/src/to/toCellDate.js +0 -12
- package/dist/src/to/toCellDate.js.map +0 -1
- package/dist/src/to/toDateStr.d.ts +0 -1
- package/dist/src/to/toDateStr.js +0 -14
- package/dist/src/to/toDateStr.js.map +0 -1
- package/dist/src/to/toGB.d.ts +0 -1
- package/dist/src/to/toGB.js +0 -47
- package/dist/src/to/toGB.js.map +0 -1
- package/dist/src/to/toGH.d.ts +0 -1
- package/dist/src/to/toGH.js +0 -36
- package/dist/src/to/toGH.js.map +0 -1
- package/dist/src/to/toInetAton.d.ts +0 -1
- package/dist/src/to/toInetAton.js +0 -18
- package/dist/src/to/toInetAton.js.map +0 -1
- package/dist/src/to/toInetNtoa.d.ts +0 -1
- package/dist/src/to/toInetNtoa.js +0 -16
- package/dist/src/to/toInetNtoa.js.map +0 -1
- package/dist/src/to/toJSON.d.ts +0 -1
- package/dist/src/to/toJSON.js +0 -14
- package/dist/src/to/toJSON.js.map +0 -1
- package/dist/src/to/toLower.d.ts +0 -1
- package/dist/src/to/toLower.js +0 -14
- package/dist/src/to/toLower.js.map +0 -1
- package/dist/src/to/toNull.d.ts +0 -1
- package/dist/src/to/toNull.js +0 -11
- package/dist/src/to/toNull.js.map +0 -1
- package/dist/src/to/toNum.d.ts +0 -1
- package/dist/src/to/toNum.js +0 -40
- package/dist/src/to/toNum.js.map +0 -1
- package/dist/src/to/toPhone.d.ts +0 -1
- package/dist/src/to/toPhone.js +0 -24
- package/dist/src/to/toPhone.js.map +0 -1
- package/dist/src/to/toPoolName.d.ts +0 -1
- package/dist/src/to/toPoolName.js +0 -19
- package/dist/src/to/toPoolName.js.map +0 -1
- package/dist/src/to/toPortions.d.ts +0 -1
- package/dist/src/to/toPortions.js +0 -16
- package/dist/src/to/toPortions.js.map +0 -1
- package/dist/src/to/toRangeip.d.ts +0 -1
- package/dist/src/to/toRangeip.js +0 -24
- package/dist/src/to/toRangeip.js.map +0 -1
- package/dist/src/to/toSqlUpdateMany.d.ts +0 -1
- package/dist/src/to/toSqlUpdateMany.js +0 -39
- package/dist/src/to/toSqlUpdateMany.js.map +0 -1
- package/dist/src/to/toTimestamp.d.ts +0 -6
- package/dist/src/to/toTimestamp.js +0 -11
- package/dist/src/to/toTimestamp.js.map +0 -1
- package/dist/src/to/toTrim.d.ts +0 -1
- package/dist/src/to/toTrim.js +0 -10
- package/dist/src/to/toTrim.js.map +0 -1
- package/dist/src/to/toUndefined.d.ts +0 -1
- package/dist/src/to/toUndefined.js +0 -11
- package/dist/src/to/toUndefined.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "full-utils",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Сomprehensive collection of pure, zero-dependency functions for everyday JavaScript and TypeScript development.",
|
|
5
5
|
"author": "ihor-bielchenko",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -12,25 +12,71 @@
|
|
|
12
12
|
"url": "https://github.com/ihor-bielchenko/full-utils/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://github.com/ihor-bielchenko/full-utils#readme",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.cjs",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"browser": {
|
|
22
|
+
"import": "./dist/browser.mjs",
|
|
23
|
+
"require": "./dist/browser.cjs"
|
|
24
|
+
},
|
|
25
|
+
"import": "./dist/index.mjs",
|
|
26
|
+
"require": "./dist/index.cjs",
|
|
27
|
+
"default": "./dist/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./node": {
|
|
30
|
+
"import": "./dist/node.mjs",
|
|
31
|
+
"require": "./dist/node.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./net": {
|
|
34
|
+
"node": {
|
|
35
|
+
"import": "./dist/net/index.mjs",
|
|
36
|
+
"require": "./dist/net/index.cjs"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"browser": {
|
|
41
|
+
"./dist/net/index.mjs": false,
|
|
42
|
+
"net": false,
|
|
43
|
+
"fs": false,
|
|
44
|
+
"tls": false
|
|
45
|
+
},
|
|
46
|
+
"sideEffects": false,
|
|
17
47
|
"files": [
|
|
18
48
|
"dist"
|
|
19
49
|
],
|
|
20
50
|
"keywords": [
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"to",
|
|
51
|
+
"typescript",
|
|
52
|
+
"javascript",
|
|
53
|
+
"utils",
|
|
54
|
+
"helpers",
|
|
55
|
+
"toolkit",
|
|
56
|
+
"library",
|
|
57
|
+
"validation",
|
|
58
|
+
"validator",
|
|
30
59
|
"format",
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
60
|
+
"formatter",
|
|
61
|
+
"converter",
|
|
62
|
+
"parsing",
|
|
63
|
+
"data",
|
|
64
|
+
"string",
|
|
65
|
+
"number",
|
|
66
|
+
"boolean",
|
|
67
|
+
"object",
|
|
68
|
+
"array",
|
|
69
|
+
"datetime",
|
|
70
|
+
"network",
|
|
71
|
+
"ip",
|
|
72
|
+
"mac",
|
|
73
|
+
"cidr",
|
|
74
|
+
"url",
|
|
75
|
+
"json",
|
|
76
|
+
"safe",
|
|
77
|
+
"lightweight",
|
|
78
|
+
"modular",
|
|
79
|
+
"utility-library",
|
|
80
|
+
"full-utils"
|
|
81
|
+
]
|
|
36
82
|
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fromJSON = fromJSON;
|
|
4
|
-
const isArrFilled_1 = require("../is/isArrFilled");
|
|
5
|
-
const isArr_1 = require("../is/isArr");
|
|
6
|
-
const isObjFilled_1 = require("../is/isObjFilled");
|
|
7
|
-
const isObj_1 = require("../is/isObj");
|
|
8
|
-
const isStrFilled_1 = require("../is/isStrFilled");
|
|
9
|
-
const isNum_1 = require("../is/isNum");
|
|
10
|
-
const isBool_1 = require("../is/isBool");
|
|
11
|
-
const QUOTED_RE = /^(['"`])([\s\S]*)\1$/;
|
|
12
|
-
function tryParseJSON(str) {
|
|
13
|
-
try {
|
|
14
|
-
return { ok: true, value: JSON.parse(str) };
|
|
15
|
-
}
|
|
16
|
-
catch (err) {
|
|
17
|
-
}
|
|
18
|
-
return { ok: false };
|
|
19
|
-
}
|
|
20
|
-
function parseStringLike(s, allowString) {
|
|
21
|
-
const trimmed = s.trim();
|
|
22
|
-
const pr = tryParseJSON(trimmed);
|
|
23
|
-
if (pr.ok) {
|
|
24
|
-
return pr.value;
|
|
25
|
-
}
|
|
26
|
-
const m = QUOTED_RE.exec(trimmed);
|
|
27
|
-
if (m) {
|
|
28
|
-
return m[2];
|
|
29
|
-
}
|
|
30
|
-
return allowString ? trimmed : null;
|
|
31
|
-
}
|
|
32
|
-
function fromJSON(value, allowString = false) {
|
|
33
|
-
if (value === null || (0, isNum_1.isNum)(value) || (0, isBool_1.isBool)(value)) {
|
|
34
|
-
return value;
|
|
35
|
-
}
|
|
36
|
-
if ((0, isArrFilled_1.isArrFilled)(value)) {
|
|
37
|
-
const arr = value;
|
|
38
|
-
const out = [];
|
|
39
|
-
for (const item of arr) {
|
|
40
|
-
if ((0, isStrFilled_1.isStrFilled)(item)) {
|
|
41
|
-
out.push(parseStringLike(String(item), allowString));
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
out.push(item);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return out;
|
|
48
|
-
}
|
|
49
|
-
if ((0, isObjFilled_1.isObjFilled)(value)) {
|
|
50
|
-
const src = value;
|
|
51
|
-
const out = {};
|
|
52
|
-
for (const key of Object.keys(src)) {
|
|
53
|
-
const v = src[key];
|
|
54
|
-
if ((0, isStrFilled_1.isStrFilled)(v)) {
|
|
55
|
-
out[key] = parseStringLike(String(v), allowString);
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
out[key] = v;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return out;
|
|
62
|
-
}
|
|
63
|
-
if ((0, isArr_1.isArr)(value) || (0, isObj_1.isObj)(value)) {
|
|
64
|
-
return value;
|
|
65
|
-
}
|
|
66
|
-
if ((0, isStrFilled_1.isStrFilled)(value)) {
|
|
67
|
-
return parseStringLike(String(value), allowString);
|
|
68
|
-
}
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=fromJSON.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fromJSON.js","sourceRoot":"","sources":["../../../src/from/fromJSON.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fromTimestamp = fromTimestamp;
|
|
4
|
-
function fromTimestamp(parts) {
|
|
5
|
-
const { days = 0, hours = 0, minutes = 0, seconds = 0 } = parts;
|
|
6
|
-
return days * 86400 + hours * 3600 + minutes * 60 + seconds;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=fromTimestamp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fromTimestamp.js","sourceRoot":"","sources":["../../../src/from/fromTimestamp.ts"],"names":[],"mappings":";;AACA,sCASC;AATD,SAAgB,aAAa,CAAC,KAK7B;IACA,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IAEhE,OAAO,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,OAAO,GAAG,EAAE,GAAG,OAAO,CAAC;AAC7D,CAAC"}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { fromJSON } from './from/fromJSON';
|
|
2
|
-
import { fromTimestamp } from './from/fromTimestamp';
|
|
3
|
-
import { isArr } from './is/isArr';
|
|
4
|
-
import { isArrFilled } from './is/isArrFilled';
|
|
5
|
-
import { isBool } from './is/isBool';
|
|
6
|
-
import { isDate } from './is/isDate';
|
|
7
|
-
import { isEmail } from './is/isEmail';
|
|
8
|
-
import { isExists } from './is/isExists';
|
|
9
|
-
import { isFunc } from './is/isFunc';
|
|
10
|
-
import { isIp } from './is/isIp';
|
|
11
|
-
import { isMac } from './is/isMac';
|
|
12
|
-
import { isNum } from './is/isNum';
|
|
13
|
-
import { isNumFloat } from './is/isNumFloat';
|
|
14
|
-
import { isNumN } from './is/isNumN';
|
|
15
|
-
import { isNumNZ } from './is/isNumNZ';
|
|
16
|
-
import { isNumP } from './is/isNumP';
|
|
17
|
-
import { isNumPZ } from './is/isNumPZ';
|
|
18
|
-
import { isObj } from './is/isObj';
|
|
19
|
-
import { isObjFilled } from './is/isObjFilled';
|
|
20
|
-
import { isPassword } from './is/isPassword';
|
|
21
|
-
import { isPhone } from './is/isPhone';
|
|
22
|
-
import { isStr } from './is/isStr';
|
|
23
|
-
import { isStrBool } from './is/isStrBool';
|
|
24
|
-
import { isStrFilled } from './is/isStrFilled';
|
|
25
|
-
import { isStrOrderType } from './is/isStrOrderType';
|
|
26
|
-
import { isVar } from './is/isVar';
|
|
27
|
-
import { toBool } from './to/toBool';
|
|
28
|
-
import { toCellDate } from './to/toCellDate';
|
|
29
|
-
import { toGB } from './to/toGB';
|
|
30
|
-
import { toGH } from './to/toGH';
|
|
31
|
-
import { toInetAton } from './to/toInetAton';
|
|
32
|
-
import { toInetNtoa } from './to/toInetNtoa';
|
|
33
|
-
import { toNum } from './to/toNum';
|
|
34
|
-
import { toPortions } from './to/toPortions';
|
|
35
|
-
import { toTimestamp } from './to/toTimestamp';
|
|
36
|
-
import { toDateStr } from './to/toDateStr';
|
|
37
|
-
import { toArrFuncArgs } from './to/toArrFuncArgs';
|
|
38
|
-
import { toJSON } from './to/toJSON';
|
|
39
|
-
import { toPhone } from './to/toPhone';
|
|
40
|
-
import { toLower } from './to/toLower';
|
|
41
|
-
import { toPoolName } from './to/toPoolName';
|
|
42
|
-
import { toTrim } from './to/toTrim';
|
|
43
|
-
import { toNull } from './to/toNull';
|
|
44
|
-
import { toUndefined } from './to/toUndefined';
|
|
45
|
-
import { toSqlUpdateMany } from './to/toSqlUpdateMany';
|
|
46
|
-
import { toRangeip } from './to/toRangeip';
|
|
47
|
-
import { netTCP } from './net/netTCP';
|
|
48
|
-
export { fromJSON, fromTimestamp, isArr, isArrFilled, isBool, isDate, isEmail, isExists, isFunc, isIp, isMac, isNum, isNumFloat, isNumN, isNumNZ, isNumP, isNumPZ, isObj, isObjFilled, isPassword, isPhone, isStr, isStrBool, isStrFilled, isStrOrderType, isVar, toBool, toCellDate, toGB, toGH, toInetAton, toInetNtoa, toNum, toPortions, toTimestamp, toDateStr, toArrFuncArgs, toJSON, toPhone, toLower, toPoolName, toTrim, toNull, toUndefined, toSqlUpdateMany, toRangeip, netTCP, };
|
package/dist/src/index.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.netTCP = exports.toRangeip = exports.toSqlUpdateMany = exports.toUndefined = exports.toNull = exports.toTrim = exports.toPoolName = exports.toLower = exports.toPhone = exports.toJSON = exports.toArrFuncArgs = exports.toDateStr = exports.toTimestamp = exports.toPortions = exports.toNum = exports.toInetNtoa = exports.toInetAton = exports.toGH = exports.toGB = exports.toCellDate = exports.toBool = exports.isVar = exports.isStrOrderType = exports.isStrFilled = exports.isStrBool = exports.isStr = exports.isPhone = exports.isPassword = exports.isObjFilled = exports.isObj = exports.isNumPZ = exports.isNumP = exports.isNumNZ = exports.isNumN = exports.isNumFloat = exports.isNum = exports.isMac = exports.isIp = exports.isFunc = exports.isExists = exports.isEmail = exports.isDate = exports.isBool = exports.isArrFilled = exports.isArr = exports.fromTimestamp = exports.fromJSON = void 0;
|
|
4
|
-
const fromJSON_1 = require("./from/fromJSON");
|
|
5
|
-
Object.defineProperty(exports, "fromJSON", { enumerable: true, get: function () { return fromJSON_1.fromJSON; } });
|
|
6
|
-
const fromTimestamp_1 = require("./from/fromTimestamp");
|
|
7
|
-
Object.defineProperty(exports, "fromTimestamp", { enumerable: true, get: function () { return fromTimestamp_1.fromTimestamp; } });
|
|
8
|
-
const isArr_1 = require("./is/isArr");
|
|
9
|
-
Object.defineProperty(exports, "isArr", { enumerable: true, get: function () { return isArr_1.isArr; } });
|
|
10
|
-
const isArrFilled_1 = require("./is/isArrFilled");
|
|
11
|
-
Object.defineProperty(exports, "isArrFilled", { enumerable: true, get: function () { return isArrFilled_1.isArrFilled; } });
|
|
12
|
-
const isBool_1 = require("./is/isBool");
|
|
13
|
-
Object.defineProperty(exports, "isBool", { enumerable: true, get: function () { return isBool_1.isBool; } });
|
|
14
|
-
const isDate_1 = require("./is/isDate");
|
|
15
|
-
Object.defineProperty(exports, "isDate", { enumerable: true, get: function () { return isDate_1.isDate; } });
|
|
16
|
-
const isEmail_1 = require("./is/isEmail");
|
|
17
|
-
Object.defineProperty(exports, "isEmail", { enumerable: true, get: function () { return isEmail_1.isEmail; } });
|
|
18
|
-
const isExists_1 = require("./is/isExists");
|
|
19
|
-
Object.defineProperty(exports, "isExists", { enumerable: true, get: function () { return isExists_1.isExists; } });
|
|
20
|
-
const isFunc_1 = require("./is/isFunc");
|
|
21
|
-
Object.defineProperty(exports, "isFunc", { enumerable: true, get: function () { return isFunc_1.isFunc; } });
|
|
22
|
-
const isIp_1 = require("./is/isIp");
|
|
23
|
-
Object.defineProperty(exports, "isIp", { enumerable: true, get: function () { return isIp_1.isIp; } });
|
|
24
|
-
const isMac_1 = require("./is/isMac");
|
|
25
|
-
Object.defineProperty(exports, "isMac", { enumerable: true, get: function () { return isMac_1.isMac; } });
|
|
26
|
-
const isNum_1 = require("./is/isNum");
|
|
27
|
-
Object.defineProperty(exports, "isNum", { enumerable: true, get: function () { return isNum_1.isNum; } });
|
|
28
|
-
const isNumFloat_1 = require("./is/isNumFloat");
|
|
29
|
-
Object.defineProperty(exports, "isNumFloat", { enumerable: true, get: function () { return isNumFloat_1.isNumFloat; } });
|
|
30
|
-
const isNumN_1 = require("./is/isNumN");
|
|
31
|
-
Object.defineProperty(exports, "isNumN", { enumerable: true, get: function () { return isNumN_1.isNumN; } });
|
|
32
|
-
const isNumNZ_1 = require("./is/isNumNZ");
|
|
33
|
-
Object.defineProperty(exports, "isNumNZ", { enumerable: true, get: function () { return isNumNZ_1.isNumNZ; } });
|
|
34
|
-
const isNumP_1 = require("./is/isNumP");
|
|
35
|
-
Object.defineProperty(exports, "isNumP", { enumerable: true, get: function () { return isNumP_1.isNumP; } });
|
|
36
|
-
const isNumPZ_1 = require("./is/isNumPZ");
|
|
37
|
-
Object.defineProperty(exports, "isNumPZ", { enumerable: true, get: function () { return isNumPZ_1.isNumPZ; } });
|
|
38
|
-
const isObj_1 = require("./is/isObj");
|
|
39
|
-
Object.defineProperty(exports, "isObj", { enumerable: true, get: function () { return isObj_1.isObj; } });
|
|
40
|
-
const isObjFilled_1 = require("./is/isObjFilled");
|
|
41
|
-
Object.defineProperty(exports, "isObjFilled", { enumerable: true, get: function () { return isObjFilled_1.isObjFilled; } });
|
|
42
|
-
const isPassword_1 = require("./is/isPassword");
|
|
43
|
-
Object.defineProperty(exports, "isPassword", { enumerable: true, get: function () { return isPassword_1.isPassword; } });
|
|
44
|
-
const isPhone_1 = require("./is/isPhone");
|
|
45
|
-
Object.defineProperty(exports, "isPhone", { enumerable: true, get: function () { return isPhone_1.isPhone; } });
|
|
46
|
-
const isStr_1 = require("./is/isStr");
|
|
47
|
-
Object.defineProperty(exports, "isStr", { enumerable: true, get: function () { return isStr_1.isStr; } });
|
|
48
|
-
const isStrBool_1 = require("./is/isStrBool");
|
|
49
|
-
Object.defineProperty(exports, "isStrBool", { enumerable: true, get: function () { return isStrBool_1.isStrBool; } });
|
|
50
|
-
const isStrFilled_1 = require("./is/isStrFilled");
|
|
51
|
-
Object.defineProperty(exports, "isStrFilled", { enumerable: true, get: function () { return isStrFilled_1.isStrFilled; } });
|
|
52
|
-
const isStrOrderType_1 = require("./is/isStrOrderType");
|
|
53
|
-
Object.defineProperty(exports, "isStrOrderType", { enumerable: true, get: function () { return isStrOrderType_1.isStrOrderType; } });
|
|
54
|
-
const isVar_1 = require("./is/isVar");
|
|
55
|
-
Object.defineProperty(exports, "isVar", { enumerable: true, get: function () { return isVar_1.isVar; } });
|
|
56
|
-
const toBool_1 = require("./to/toBool");
|
|
57
|
-
Object.defineProperty(exports, "toBool", { enumerable: true, get: function () { return toBool_1.toBool; } });
|
|
58
|
-
const toCellDate_1 = require("./to/toCellDate");
|
|
59
|
-
Object.defineProperty(exports, "toCellDate", { enumerable: true, get: function () { return toCellDate_1.toCellDate; } });
|
|
60
|
-
const toGB_1 = require("./to/toGB");
|
|
61
|
-
Object.defineProperty(exports, "toGB", { enumerable: true, get: function () { return toGB_1.toGB; } });
|
|
62
|
-
const toGH_1 = require("./to/toGH");
|
|
63
|
-
Object.defineProperty(exports, "toGH", { enumerable: true, get: function () { return toGH_1.toGH; } });
|
|
64
|
-
const toInetAton_1 = require("./to/toInetAton");
|
|
65
|
-
Object.defineProperty(exports, "toInetAton", { enumerable: true, get: function () { return toInetAton_1.toInetAton; } });
|
|
66
|
-
const toInetNtoa_1 = require("./to/toInetNtoa");
|
|
67
|
-
Object.defineProperty(exports, "toInetNtoa", { enumerable: true, get: function () { return toInetNtoa_1.toInetNtoa; } });
|
|
68
|
-
const toNum_1 = require("./to/toNum");
|
|
69
|
-
Object.defineProperty(exports, "toNum", { enumerable: true, get: function () { return toNum_1.toNum; } });
|
|
70
|
-
const toPortions_1 = require("./to/toPortions");
|
|
71
|
-
Object.defineProperty(exports, "toPortions", { enumerable: true, get: function () { return toPortions_1.toPortions; } });
|
|
72
|
-
const toTimestamp_1 = require("./to/toTimestamp");
|
|
73
|
-
Object.defineProperty(exports, "toTimestamp", { enumerable: true, get: function () { return toTimestamp_1.toTimestamp; } });
|
|
74
|
-
const toDateStr_1 = require("./to/toDateStr");
|
|
75
|
-
Object.defineProperty(exports, "toDateStr", { enumerable: true, get: function () { return toDateStr_1.toDateStr; } });
|
|
76
|
-
const toArrFuncArgs_1 = require("./to/toArrFuncArgs");
|
|
77
|
-
Object.defineProperty(exports, "toArrFuncArgs", { enumerable: true, get: function () { return toArrFuncArgs_1.toArrFuncArgs; } });
|
|
78
|
-
const toJSON_1 = require("./to/toJSON");
|
|
79
|
-
Object.defineProperty(exports, "toJSON", { enumerable: true, get: function () { return toJSON_1.toJSON; } });
|
|
80
|
-
const toPhone_1 = require("./to/toPhone");
|
|
81
|
-
Object.defineProperty(exports, "toPhone", { enumerable: true, get: function () { return toPhone_1.toPhone; } });
|
|
82
|
-
const toLower_1 = require("./to/toLower");
|
|
83
|
-
Object.defineProperty(exports, "toLower", { enumerable: true, get: function () { return toLower_1.toLower; } });
|
|
84
|
-
const toPoolName_1 = require("./to/toPoolName");
|
|
85
|
-
Object.defineProperty(exports, "toPoolName", { enumerable: true, get: function () { return toPoolName_1.toPoolName; } });
|
|
86
|
-
const toTrim_1 = require("./to/toTrim");
|
|
87
|
-
Object.defineProperty(exports, "toTrim", { enumerable: true, get: function () { return toTrim_1.toTrim; } });
|
|
88
|
-
const toNull_1 = require("./to/toNull");
|
|
89
|
-
Object.defineProperty(exports, "toNull", { enumerable: true, get: function () { return toNull_1.toNull; } });
|
|
90
|
-
const toUndefined_1 = require("./to/toUndefined");
|
|
91
|
-
Object.defineProperty(exports, "toUndefined", { enumerable: true, get: function () { return toUndefined_1.toUndefined; } });
|
|
92
|
-
const toSqlUpdateMany_1 = require("./to/toSqlUpdateMany");
|
|
93
|
-
Object.defineProperty(exports, "toSqlUpdateMany", { enumerable: true, get: function () { return toSqlUpdateMany_1.toSqlUpdateMany; } });
|
|
94
|
-
const toRangeip_1 = require("./to/toRangeip");
|
|
95
|
-
Object.defineProperty(exports, "toRangeip", { enumerable: true, get: function () { return toRangeip_1.toRangeip; } });
|
|
96
|
-
const netTCP_1 = require("./net/netTCP");
|
|
97
|
-
Object.defineProperty(exports, "netTCP", { enumerable: true, get: function () { return netTCP_1.netTCP; } });
|
|
98
|
-
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAiD1C,yFAjDQ,mBAAQ,OAiDR;AAhDT,wDAAqD;AAiDpD,8FAjDQ,6BAAa,OAiDR;AAhDd,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,kDAA+C;AAiD9C,4FAjDQ,yBAAW,OAiDR;AAhDZ,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,4CAAyC;AAiDxC,yFAjDQ,mBAAQ,OAiDR;AAhDT,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,oCAAiC;AAiDhC,qFAjDQ,WAAI,OAiDR;AAhDL,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,kDAA+C;AAiD9C,4FAjDQ,yBAAW,OAiDR;AAhDZ,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,8CAA2C;AAiD1C,0FAjDQ,qBAAS,OAiDR;AAhDV,kDAA+C;AAiD9C,4FAjDQ,yBAAW,OAiDR;AAhDZ,wDAAqD;AAiDpD,+FAjDQ,+BAAc,OAiDR;AAhDf,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,oCAAiC;AAiDhC,qFAjDQ,WAAI,OAiDR;AAhDL,oCAAiC;AAiDhC,qFAjDQ,WAAI,OAiDR;AAhDL,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,sCAAmC;AAiDlC,sFAjDQ,aAAK,OAiDR;AAhDN,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,kDAA+C;AAiD9C,4FAjDQ,yBAAW,OAiDR;AAhDZ,8CAA2C;AAiD1C,0FAjDQ,qBAAS,OAiDR;AAhDV,sDAAmD;AAiDlD,8FAjDQ,6BAAa,OAiDR;AAhDd,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,0CAAuC;AAiDtC,wFAjDQ,iBAAO,OAiDR;AAhDR,gDAA6C;AAiD5C,2FAjDQ,uBAAU,OAiDR;AAhDX,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,wCAAqC;AAiDpC,uFAjDQ,eAAM,OAiDR;AAhDP,kDAA+C;AAiD9C,4FAjDQ,yBAAW,OAiDR;AAhDZ,0DAAuD;AAiDtD,gGAjDQ,iCAAe,OAiDR;AAhDhB,8CAA2C;AAiD1C,0FAjDQ,qBAAS,OAiDR;AAhDV,yCAAsC;AAiDrC,uFAjDQ,eAAM,OAiDR"}
|
package/dist/src/is/isArr.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isArr<T = unknown>(value: unknown): value is readonly [T, ...T[]];
|
package/dist/src/is/isArr.js
DELETED
package/dist/src/is/isArr.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isArr.js","sourceRoot":"","sources":["../../../src/is/isArr.ts"],"names":[],"mappings":";;AACA,sBAEC;AAFD,SAAgB,KAAK,CAAc,KAAc;IAChD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isArrFilled<T = unknown>(value: unknown): value is readonly [T, ...T[]];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isArrFilled = isArrFilled;
|
|
4
|
-
const isArr_1 = require("./isArr");
|
|
5
|
-
function isArrFilled(value) {
|
|
6
|
-
return (0, isArr_1.isArr)(value) && value.length > 0;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=isArrFilled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isArrFilled.js","sourceRoot":"","sources":["../../../src/is/isArrFilled.ts"],"names":[],"mappings":";;AAEA,kCAEC;AAJD,mCAAgC;AAEhC,SAAgB,WAAW,CAAc,KAAc;IACtD,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/src/is/isBool.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isBool(value: unknown): value is boolean;
|
package/dist/src/is/isBool.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isBool.js","sourceRoot":"","sources":["../../../src/is/isBool.ts"],"names":[],"mappings":";;AACA,wBAEC;AAFD,SAAgB,MAAM,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,SAAS,CAAC;AACnC,CAAC"}
|
package/dist/src/is/isDate.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isDate(value: unknown): boolean;
|
package/dist/src/is/isDate.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDate = isDate;
|
|
4
|
-
const isStr_1 = require("./isStr");
|
|
5
|
-
const isNum_1 = require("./isNum");
|
|
6
|
-
function isDate(value) {
|
|
7
|
-
if (value instanceof Date) {
|
|
8
|
-
return !Number.isNaN(value.getTime());
|
|
9
|
-
}
|
|
10
|
-
if ((0, isStr_1.isStr)(value) || (0, isNum_1.isNum)(value)) {
|
|
11
|
-
const d = new Date(value);
|
|
12
|
-
return !Number.isNaN(d.getTime());
|
|
13
|
-
}
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=isDate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../src/is/isDate.ts"],"names":[],"mappings":";;AAGA,wBAUC;AAbD,mCAAgC;AAChC,mCAAgC;AAEhC,SAAgB,MAAM,CAAC,KAAc;IACpC,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,IAAA,aAAK,EAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAY,CAAC,CAAC;QAEjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC"}
|
package/dist/src/is/isEmail.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isEmail(value: unknown): value is string;
|
package/dist/src/is/isEmail.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEmail = isEmail;
|
|
4
|
-
const validator_1 = require("validator");
|
|
5
|
-
const isStrFilled_1 = require("./isStrFilled");
|
|
6
|
-
function isEmail(value) {
|
|
7
|
-
return (0, isStrFilled_1.isStrFilled)(value) && validator_1.default.isEmail(value);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=isEmail.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isEmail.js","sourceRoot":"","sources":["../../../src/is/isEmail.ts"],"names":[],"mappings":";;AAGA,0BAEC;AALD,yCAAkC;AAClC,+CAA4C;AAE5C,SAAgB,OAAO,CAAC,KAAc;IACrC,OAAO,IAAA,yBAAW,EAAC,KAAK,CAAC,IAAI,mBAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isExists<T>(value: T | null | undefined): value is T;
|
package/dist/src/is/isExists.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isExists.js","sourceRoot":"","sources":["../../../src/is/isExists.ts"],"names":[],"mappings":";;AACA,4BAEC;AAFD,SAAgB,QAAQ,CAAI,KAA2B;IACtD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC9C,CAAC"}
|
package/dist/src/is/isFunc.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isFunc<T extends Function = Function>(value: unknown): value is T;
|
package/dist/src/is/isFunc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isFunc.js","sourceRoot":"","sources":["../../../src/is/isFunc.ts"],"names":[],"mappings":";;AACA,wBAEC;AAFD,SAAgB,MAAM,CAAgC,KAAc;IACnE,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACpC,CAAC"}
|
package/dist/src/is/isIp.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isIp(value: unknown): value is string;
|
package/dist/src/is/isIp.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isIp = isIp;
|
|
4
|
-
const isStr_1 = require("./isStr");
|
|
5
|
-
const IPV4_RE = /^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/;
|
|
6
|
-
function isIp(value) {
|
|
7
|
-
if (!(0, isStr_1.isStr)(value)) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
const v = value.trim();
|
|
11
|
-
return IPV4_RE.test(v);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=isIp.js.map
|
package/dist/src/is/isIp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isIp.js","sourceRoot":"","sources":["../../../src/is/isIp.ts"],"names":[],"mappings":";;AAIA,oBAOC;AAXD,mCAAgC;AAEhC,MAAM,OAAO,GAAG,8HAA8H,CAAC;AAE/I,SAAgB,IAAI,CAAC,KAAc;IAClC,IAAI,CAAC,IAAA,aAAK,EAAC,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAEvB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC"}
|
package/dist/src/is/isMac.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isMac(value: unknown): value is string;
|
package/dist/src/is/isMac.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isMac = isMac;
|
|
4
|
-
const isStr_1 = require("./isStr");
|
|
5
|
-
function isMac(value) {
|
|
6
|
-
return (0, isStr_1.isStr)(value) && /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(value);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=isMac.js.map
|
package/dist/src/is/isMac.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isMac.js","sourceRoot":"","sources":["../../../src/is/isMac.ts"],"names":[],"mappings":";;AAEA,sBAEC;AAJD,mCAAgC;AAEhC,SAAgB,KAAK,CAAC,KAAc;IACnC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,2CAA2C,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChF,CAAC"}
|
package/dist/src/is/isNum.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNum(value: unknown): value is number;
|
package/dist/src/is/isNum.js
DELETED
package/dist/src/is/isNum.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNum.js","sourceRoot":"","sources":["../../../src/is/isNum.ts"],"names":[],"mappings":";;AACA,sBAEC;AAFD,SAAgB,KAAK,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNumFloat(value: unknown): value is number;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNumFloat = isNumFloat;
|
|
4
|
-
const isNum_1 = require("./isNum");
|
|
5
|
-
function isNumFloat(value) {
|
|
6
|
-
return (0, isNum_1.isNum)(value) && !Number.isInteger(value);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=isNumFloat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNumFloat.js","sourceRoot":"","sources":["../../../src/is/isNumFloat.ts"],"names":[],"mappings":";;AAEA,gCAEC;AAJD,mCAAgC;AAEhC,SAAgB,UAAU,CAAC,KAAc;IACxC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/src/is/isNumN.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNumN(value: unknown): value is number;
|
package/dist/src/is/isNumN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNumN.js","sourceRoot":"","sources":["../../../src/is/isNumN.ts"],"names":[],"mappings":";;AAEA,wBAEC;AAJD,mCAAgC;AAEhC,SAAgB,MAAM,CAAC,KAAc;IACpC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/src/is/isNumNZ.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNumNZ(value: unknown): value is number;
|
package/dist/src/is/isNumNZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNumNZ.js","sourceRoot":"","sources":["../../../src/is/isNumNZ.ts"],"names":[],"mappings":";;AAEA,0BAEC;AAJD,mCAAgC;AAEhC,SAAgB,OAAO,CAAC,KAAc;IACrC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
package/dist/src/is/isNumP.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNumP(value: unknown): value is number;
|
package/dist/src/is/isNumP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNumP.js","sourceRoot":"","sources":["../../../src/is/isNumP.ts"],"names":[],"mappings":";;AAEA,wBAEC;AAJD,mCAAgC;AAEhC,SAAgB,MAAM,CAAC,KAAc;IACpC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/src/is/isNumPZ.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isNumPZ(value: unknown): value is number;
|
package/dist/src/is/isNumPZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isNumPZ.js","sourceRoot":"","sources":["../../../src/is/isNumPZ.ts"],"names":[],"mappings":";;AAEA,0BAEC;AAJD,mCAAgC;AAEhC,SAAgB,OAAO,CAAC,KAAc;IACrC,OAAO,IAAA,aAAK,EAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACnC,CAAC"}
|