@tim-code/my-util 0.6.0 → 0.6.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/eslint.config.js +1 -0
- package/package.json +4 -13
- package/src/array.js +0 -1
- package/src/find.js +1 -1
- package/src/time.js +1 -1
package/eslint.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@tim-code/eslint-config"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tim-code/my-util",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Tim Sprowl",
|
|
@@ -21,24 +21,15 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "node --no-warnings --experimental-vm-modules node_modules/.bin/jest"
|
|
23
23
|
},
|
|
24
|
-
"eslintConfig": {
|
|
25
|
-
"root": true,
|
|
26
|
-
"extends": [
|
|
27
|
-
"@tim-code"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
24
|
"devDependencies": {
|
|
31
|
-
"@jest/globals": "^
|
|
32
|
-
"@tim-code/eslint-config": "^
|
|
33
|
-
"jest": "^
|
|
25
|
+
"@jest/globals": "^30.2.0",
|
|
26
|
+
"@tim-code/eslint-config": "^2.0.1",
|
|
27
|
+
"jest": "^30.2.0"
|
|
34
28
|
},
|
|
35
29
|
"jest": {
|
|
36
30
|
"transform": {}
|
|
37
31
|
},
|
|
38
32
|
"publishConfig": {
|
|
39
33
|
"access": "public"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@tim-code/my-util": "^0.5.5"
|
|
43
34
|
}
|
|
44
35
|
}
|
package/src/array.js
CHANGED
package/src/find.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable complexity */
|
|
1
2
|
export function findEq(array, desired, { key } = {}) {
|
|
2
3
|
if (typeof key === "function") {
|
|
3
4
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -316,7 +317,6 @@ export function findMax(array, { key, cutoff = -Infinity } = {}) {
|
|
|
316
317
|
* When true, changes the default values of "from", "until", "to" to `array.length - 1`, `-1`, `0`.
|
|
317
318
|
* @returns {T}
|
|
318
319
|
*/
|
|
319
|
-
// eslint-disable-next-line complexity
|
|
320
320
|
export function findTruthy(
|
|
321
321
|
array,
|
|
322
322
|
{
|
package/src/time.js
CHANGED