lodash-builder
v0.1.2
Published
Build your own lodash by config.
Downloads
10
Readme
lodash-builder
Build your own lodash since there's too many methods in lodash which you may not need.
- packed by rollup
- output in IIFE format or ECMAScript Module
- use in nodejs or CLI
- produce minify dist and source map
Install
By npm:
npm i lodash-builder --save
By yarn:
yarn add lodash-builder
Module
The export module of this package is an async function which accepts some params to build custom lodash.
Params
methods
Type: Array<string>
Default: []
Description: lodash methods which you want.
minify
Type: <boolean>
Default: true
Description: minify the dist or not.
format
Type: <string>
Default: iife
Description: output format. Could be iife
, es
or umd
.
output
Type: <string>
Default: undefined
Description: output file path. Will write to stdout if no output
param specified.
Response
The export module will response a promise which include code
.
Usage Examples
const lodashBuilder = require('lodash-builder');
lodashBuilder({
methods: [
'assignIn',
'clone'
],
output: 'path/to/target'
});
Test
npm test