File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 31
31
"clean" : " rimraf dist dist-jsdoc" ,
32
32
"build:prod" : " cross-env NODE_ENV=production webpack" ,
33
33
"build:dev" : " webpack" ,
34
- "test" : " npm run build:prod && jest" ,
34
+ "test" : " jest && npm run build:prod && cross-env MAIN=dist jest" ,
35
35
"test:dev" : " npm run build:dev && jest" ,
36
36
"test:debug" : " node --inspect=9229 node_modules/jest/bin/jest.js --runInBand" ,
37
37
"release" : " npm run build:prod && npm publish dist && cross-env git tag v$npm_package_version && git push --tags && cross-env opn https://github.com/$npm_package_author_name/$(basename $PWD)/releases/new?tag=v$npm_package_version"
Original file line number Diff line number Diff line change 1
1
/** @module array-to-object-keys */
2
+
2
3
/**
3
4
* @typedef valueGenerator
4
5
* @type {function }
5
6
* @param {string } value The original array entry
6
7
* @param {number } index The index of the array entry (starts at 0)
7
8
* @returns {* }
8
9
*/
10
+
9
11
/**
10
12
* Converts an array to an object with static keys and customizable values
11
13
* @example
Original file line number Diff line number Diff line change 1
- import arrayToObjectKeys from "../dist"
1
+ import path from "path"
2
+
3
+ const indexModule = ( process . env . MAIN ? path . resolve ( process . env . MAIN ) : path . join ( __dirname , ".." , "src" ) ) | > require
4
+ const { default : arrayToObjectKeys } = indexModule
2
5
3
6
it ( "should run with 1 argument" , ( ) => {
4
7
const result = arrayToObjectKeys ( [ "a" , "b" ] )
You can’t perform that action at this time.
0 commit comments