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 3131 "clean" : " rimraf dist dist-jsdoc" ,
3232 "build:prod" : " cross-env NODE_ENV=production webpack" ,
3333 "build:dev" : " webpack" ,
34- "test" : " npm run build:prod && jest" ,
34+ "test" : " jest && npm run build:prod && cross-env MAIN=dist jest" ,
3535 "test:dev" : " npm run build:dev && jest" ,
3636 "test:debug" : " node --inspect=9229 node_modules/jest/bin/jest.js --runInBand" ,
3737 "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 11/** @module array-to-object-keys */
2+
23/**
34 * @typedef valueGenerator
45 * @type {function }
56 * @param {string } value The original array entry
67 * @param {number } index The index of the array entry (starts at 0)
78 * @returns {* }
89 */
10+
911/**
1012 * Converts an array to an object with static keys and customizable values
1113 * @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
25
36it ( "should run with 1 argument" , ( ) => {
47 const result = arrayToObjectKeys ( [ "a" , "b" ] )
You can’t perform that action at this time.
0 commit comments