@nyaomaru/divider 1.9.22 → 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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -3
package/dist/index.cjs
CHANGED
|
@@ -95,7 +95,7 @@ function isEmptyArray(value) {
|
|
|
95
95
|
return Array.isArray(value) && value.length === 0;
|
|
96
96
|
}
|
|
97
97
|
function isPositiveInteger(value) {
|
|
98
|
-
return Number.isInteger(value) && value > 0;
|
|
98
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
99
99
|
}
|
|
100
100
|
function isValidInput(value) {
|
|
101
101
|
return isString(value) || Array.isArray(value) && value.every(isString);
|
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ function isEmptyArray(value) {
|
|
|
61
61
|
return Array.isArray(value) && value.length === 0;
|
|
62
62
|
}
|
|
63
63
|
function isPositiveInteger(value) {
|
|
64
|
-
return Number.isInteger(value) && value > 0;
|
|
64
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
65
65
|
}
|
|
66
66
|
function isValidInput(value) {
|
|
67
67
|
return isString(value) || Array.isArray(value) && value.every(isString);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyaomaru/divider",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "To divide string or string[] with a given separator",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"eslint-config-prettier": "^10.1.8",
|
|
46
46
|
"eslint-plugin-prettier": "^5.5.4",
|
|
47
47
|
"jest": "^30.2.0",
|
|
48
|
+
"knip": "^5.82.1",
|
|
48
49
|
"lefthook": "^2.0.13",
|
|
49
50
|
"prettier": "^3.5.3",
|
|
50
51
|
"ts-jest": "^29.4.5",
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
"typescript": "^5.8.3"
|
|
56
57
|
},
|
|
57
58
|
"engines": {
|
|
58
|
-
"node": ">=
|
|
59
|
+
"node": ">=20"
|
|
59
60
|
},
|
|
60
61
|
"sideEffects": false,
|
|
61
62
|
"bugs": {
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"test:unit": "jest --testPathIgnorePatterns=performance",
|
|
68
69
|
"lint": "eslint .",
|
|
69
70
|
"build": "tsup",
|
|
70
|
-
"typedoc": "typedoc"
|
|
71
|
+
"typedoc": "typedoc",
|
|
72
|
+
"knip": "knip"
|
|
71
73
|
}
|
|
72
74
|
}
|