es-toolkit 1.22.0 → 1.23.0-dev.715
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/CHANGELOG.md +13 -0
- package/dist/_chunk/{flowRight-BzdOZX.js → flowRight-Dv8J0U.js} +21 -3
- package/dist/_chunk/{toMerged-2WPeoI.js → isObjectLike-aywuSF.js} +20 -10
- package/dist/_chunk/{isPlainObject-BIekvL.js → isPlainObject-DgrsU7.js} +11 -11
- package/dist/_chunk/{isWeakSet-clQklw.js → isWeakSet-BAMm2l.js} +85 -22
- package/dist/_chunk/noop-2IwLUk.js +5 -0
- package/dist/_chunk/{pad-Cw2pvt.js → pad-BWiShN.js} +21 -21
- package/dist/browser.global.js +1 -1
- package/dist/browser.global.js.map +1 -1
- package/dist/compat/array/dropWhile.d.mts +20 -0
- package/dist/compat/array/dropWhile.d.ts +20 -0
- package/dist/compat/array/every.d.mts +11 -11
- package/dist/compat/array/every.d.ts +11 -11
- package/dist/compat/array/filter.d.mts +10 -11
- package/dist/compat/array/filter.d.ts +10 -11
- package/dist/compat/array/filter.mjs +13 -0
- package/dist/compat/array/includes.mjs +1 -4
- package/dist/compat/function/flow.d.mts +133 -0
- package/dist/compat/function/flow.d.ts +133 -0
- package/dist/compat/function/flow.mjs +12 -0
- package/dist/compat/function/flowRight.d.mts +145 -0
- package/dist/compat/function/flowRight.d.ts +145 -0
- package/dist/compat/function/flowRight.mjs +12 -0
- package/dist/compat/index.d.mts +8 -2
- package/dist/compat/index.d.ts +8 -2
- package/dist/compat/index.js +87 -51
- package/dist/compat/index.mjs +9 -3
- package/dist/compat/math/random.mjs +1 -1
- package/dist/compat/object/has.mjs +2 -2
- package/dist/compat/object/mapKeys.mjs +1 -1
- package/dist/compat/object/mapValues.mjs +1 -1
- package/dist/compat/object/merge.mjs +1 -1
- package/dist/compat/object/mergeWith.mjs +1 -1
- package/dist/compat/object/omit.mjs +1 -1
- package/dist/compat/object/pick.mjs +2 -2
- package/dist/compat/object/unset.mjs +1 -1
- package/dist/compat/predicate/isMatch.mjs +4 -0
- package/dist/compat/predicate/matches.mjs +1 -1
- package/dist/compat/predicate/matchesProperty.mjs +1 -1
- package/dist/function/curryRight.d.mts +140 -0
- package/dist/function/curryRight.d.ts +140 -0
- package/dist/function/curryRight.mjs +21 -0
- package/dist/function/index.d.mts +1 -0
- package/dist/function/index.d.ts +1 -0
- package/dist/function/index.js +4 -2
- package/dist/function/index.mjs +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +23 -16
- package/dist/index.mjs +6 -0
- package/dist/object/clone.mjs +1 -1
- package/dist/object/cloneDeep.mjs +2 -2
- package/dist/object/index.js +13 -13
- package/dist/object/merge.mjs +14 -4
- package/dist/object/pick.mjs +1 -1
- package/dist/predicate/index.d.mts +5 -0
- package/dist/predicate/index.d.ts +5 -0
- package/dist/predicate/index.js +7 -2
- package/dist/predicate/index.mjs +5 -0
- package/dist/predicate/isArrayBuffer.d.mts +20 -0
- package/dist/predicate/isArrayBuffer.d.ts +20 -0
- package/dist/predicate/isArrayBuffer.mjs +5 -0
- package/dist/predicate/isEqual.mjs +3 -171
- package/dist/predicate/isEqualWith.d.mts +38 -0
- package/dist/predicate/isEqualWith.d.ts +38 -0
- package/dist/predicate/isEqualWith.mjs +184 -0
- package/dist/predicate/isJSONArray.d.mts +17 -0
- package/dist/predicate/isJSONArray.d.ts +17 -0
- package/dist/predicate/isJSONArray.mjs +10 -0
- package/dist/predicate/isJSONObject.d.mts +16 -0
- package/dist/predicate/isJSONObject.d.ts +16 -0
- package/dist/predicate/isJSONObject.mjs +22 -0
- package/dist/predicate/isJSONValue.d.mts +27 -0
- package/dist/predicate/isJSONValue.d.ts +27 -0
- package/dist/predicate/isJSONValue.mjs +20 -0
- package/dist/predicate/isPlainObject.d.mts +3 -3
- package/dist/predicate/isPlainObject.d.ts +3 -3
- package/dist/predicate/isPlainObject.mjs +7 -7
- package/dist/string/_internal/getWords.mjs +1 -1
- package/dist/string/camelCase.mjs +1 -1
- package/dist/string/index.js +1 -1
- package/dist/string/trim.mjs +1 -1
- package/package.json +11 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
function isPlainObject(
|
|
2
|
-
if (typeof
|
|
1
|
+
function isPlainObject(value) {
|
|
2
|
+
if (typeof value !== 'object') {
|
|
3
3
|
return false;
|
|
4
4
|
}
|
|
5
|
-
if (
|
|
5
|
+
if (value == null) {
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
|
-
if (Object.getPrototypeOf(
|
|
8
|
+
if (Object.getPrototypeOf(value) === null) {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
11
|
+
if (value.toString() !== '[object Object]') {
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
|
-
let proto =
|
|
14
|
+
let proto = value;
|
|
15
15
|
while (Object.getPrototypeOf(proto) !== null) {
|
|
16
16
|
proto = Object.getPrototypeOf(proto);
|
|
17
17
|
}
|
|
18
|
-
return Object.getPrototypeOf(
|
|
18
|
+
return Object.getPrototypeOf(value) === proto;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export { isPlainObject };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const CASE_SPLIT_PATTERN =
|
|
1
|
+
const CASE_SPLIT_PATTERN = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
|
|
2
2
|
function getWords(str) {
|
|
3
3
|
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
|
|
4
4
|
}
|
package/dist/string/index.js
CHANGED
package/dist/string/trim.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
3
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0-dev.715+83465dbe",
|
|
5
5
|
"homepage": "https://es-toolkit.slash.page",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|
|
7
7
|
"repository": {
|
|
@@ -218,17 +218,20 @@
|
|
|
218
218
|
"@eslint/js": "^9.9.0",
|
|
219
219
|
"@rollup/plugin-terser": "^0.4.4",
|
|
220
220
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
221
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
221
222
|
"@types/broken-link-checker": "^0",
|
|
222
223
|
"@types/eslint": "^9",
|
|
223
224
|
"@types/jscodeshift": "^0.11.11",
|
|
224
225
|
"@types/node": "^20.12.11",
|
|
225
226
|
"@types/tar": "^6.1.13",
|
|
226
|
-
"@vitest/coverage-istanbul": "^1.
|
|
227
|
+
"@vitest/coverage-istanbul": "^2.1.1",
|
|
228
|
+
"@vue/compiler-sfc": "^3.5.10",
|
|
227
229
|
"broken-link-checker": "^0.7.8",
|
|
228
230
|
"eslint": "^9.9.0",
|
|
229
231
|
"eslint-config-prettier": "^9.1.0",
|
|
230
232
|
"eslint-plugin-jsdoc": "^50.2.2",
|
|
231
233
|
"eslint-plugin-no-for-of-array": "^0.0.1",
|
|
234
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
232
235
|
"eslint-plugin-vue": "^9.28.0",
|
|
233
236
|
"execa": "^9.3.0",
|
|
234
237
|
"globals": "^15.9.0",
|
|
@@ -241,7 +244,12 @@
|
|
|
241
244
|
"tsx": "^4.19.0",
|
|
242
245
|
"typescript": "^5.4.5",
|
|
243
246
|
"typescript-eslint": "^8.1.0",
|
|
244
|
-
"vitest": "^1.
|
|
247
|
+
"vitest": "^2.1.1"
|
|
248
|
+
},
|
|
249
|
+
"dependenciesMeta": {
|
|
250
|
+
"@trivago/prettier-plugin-sort-imports@4.3.0": {
|
|
251
|
+
"unplugged": true
|
|
252
|
+
}
|
|
245
253
|
},
|
|
246
254
|
"sideEffects": false,
|
|
247
255
|
"scripts": {
|