lodash-builder
Build your own lodash by config.
Last updated 2 years ago by poppinl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lodash-builder 
SYNC missed versions from official npm registry.

lodash-builder

Build Status Code coverage Code style Dependency Status Dev Dependency Status NPM version NPM downloads NPM license

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

Current Tags

  • 0.1.2                                ...           latest (2 years ago)

3 Versions

  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (6)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |