flatten-array-ts
v0.0.2
Published
## Install
Downloads
2
Readme
flatten-array-ts
Install
npm install flatten-array-ts
Usage
import flattenArray from 'flattenArray'
flattenArray([[1, 2, 3], [101, 2, 1, 10], [2, 1]])
// Output: [1, 2, 3, 101, 10]
Development
NPM scripts
npm t
: Run test suitenpm start
: Runnpm run build
in watch modenpm run test:watch
: Run test suite in interactive watch modenpm run test:prod
: Run linting and generate coveragenpm run build
: Generate bundles and typings, create docsnpm run lint
: Lints codenpm run commit
: Commit using conventional commit style (husky will tell you to use it if you haven't :wink:)
Excluding peerDependencies
On library development, one might want to set some peer dependencies, and thus remove those from the final bundle. You can see in Rollup docs how to do that.
Good news: the setup is here for you, you must only include the dependency name in external
property within rollup.config.js
. For example, if you want to exclude lodash
, just write there external: ['lodash']
.
Automatic releases
Prerequisites: you need to create/login accounts and add your project to:
Prerequisite for Windows: Semantic-release uses node-gyp so you will need to install Microsoft's windows-build-tools using this command:
npm install --global --production windows-build-tools