File tree 3 files changed +14
-61
lines changed
3 files changed +14
-61
lines changed Original file line number Diff line number Diff line change 1
- /**
2
- * Function called for each element in an array.
3
- *
4
- * @typeParam Value
5
- * Element in array.
6
- * @typeParam ThisArg
7
- * Context object passed as `this`.
8
- * @param value
9
- * Element in array.
10
- * @param index
11
- * Index of `value` in `values`.
12
- * @param values
13
- * List.
14
- * @param [thisArg]
15
- * Context object
16
- * @returns {number|void }
17
- * The `index` to move to next.
18
- */
19
- export type CallbackFn < Value , ThisArg = undefined > = (
20
- this : ThisArg ,
21
- value : Value ,
22
- index : number ,
23
- array : Value [ ]
24
- ) => number | void
25
-
26
- /**
27
- * Perform the specified action for each element in an array.
28
- * When `callbackFn` returns a `number`, moves to the element at that index
29
- * next.
30
- *
31
- * @typeParam Value
32
- * Type in `values`.
33
- * @typeParam ThisArg
34
- * Context passed as `this` to callback.
35
- * @param values
36
- * Values to iterate over.
37
- * @param callbackFn
38
- * Function called for each element.
39
- * Can return the `index` to move to next.
40
- * @param [thisArg]
41
- * Optional object assigned as `this` in `callbackFn`.
42
- * @returns {void }
43
- */
44
- export function arrayIterate < Value , ThisArg = undefined > (
45
- values : Value [ ] ,
46
- callbackFn : CallbackFn < Value , ThisArg > ,
47
- thisArg ?: ThisArg
48
- ) : void
1
+ export { arrayIterate } from './lib/index.js'
Original file line number Diff line number Diff line change 34
34
"prettier" : " ^2.0.0" ,
35
35
"remark-cli" : " ^11.0.0" ,
36
36
"remark-preset-wooorm" : " ^9.0.0" ,
37
- "rimraf" : " ^3.0.0" ,
38
37
"tape" : " ^5.0.0" ,
39
38
"type-coverage" : " ^2.0.0" ,
40
39
"typescript" : " ^4.0.0" ,
41
40
"xo" : " ^0.53.0"
42
41
},
43
42
"scripts" : {
44
- "prepublishOnly " : " npm run build && npm run format" ,
45
- "build" : " rimraf \" lib/**/*.d.ts \" \" test.d.ts \" && tsc && type-coverage" ,
43
+ "prepack " : " npm run build && npm run format" ,
44
+ "build" : " tsc --build --clean && tsc --build && type-coverage" ,
46
45
"format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
47
46
"test-api" : " node --conditions development test.js" ,
48
- "test-coverage" : " c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov npm run test-api" ,
47
+ "test-coverage" : " c8 --check-coverage --100 --reporter lcov npm run test-api" ,
49
48
"test" : " npm run build && npm run format && npm run test-coverage"
50
49
},
51
50
"prettier" : {
61
60
},
62
61
"remarkConfig" : {
63
62
"plugins" : [
64
- " preset-wooorm"
63
+ " remark- preset-wooorm"
65
64
]
66
65
},
67
66
"typeCoverage" : {
Original file line number Diff line number Diff line change 1
1
{
2
- "include" : [" lib/**/*.js" , " test.js" ],
2
+ "include" : [" **/**.js" ],
3
+ "exclude" : [" coverage" , " node_modules" ],
3
4
"compilerOptions" : {
4
- "target" : " ES2020" ,
5
- "lib" : [" ES2020" ],
6
- "module" : " ES2020" ,
7
- "moduleResolution" : " node" ,
8
- "allowJs" : true ,
9
5
"checkJs" : true ,
10
6
"declaration" : true ,
11
7
"emitDeclarationOnly" : true ,
12
- "allowSyntheticDefaultImports" : true ,
8
+ "exactOptionalPropertyTypes" : true ,
9
+ "forceConsistentCasingInFileNames" : true ,
10
+ "lib" : [" es2020" ],
11
+ "module" : " node16" ,
12
+ "newLine" : " lf" ,
13
13
"skipLibCheck" : true ,
14
- "strict" : true
14
+ "strict" : true ,
15
+ "target" : " es2020"
15
16
}
16
17
}
You can’t perform that action at this time.
0 commit comments