Skip to content

AaronBank/tool-libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tool-libraries

tool-libraries

Use

Install
npm install tool-libraries
// or
yarn add tool-libraries
Sample
import {types} from 'tool-libraries'

const now = new Date()

types.typeof(now) // date

types.isDate(now) // true

See the tool-libraries documentation for more details.


Introduced on demand

Install
  yarn add babel-plugin-library -D
  // or
  npm install babel-plugin-library -D
Configuration
  • .babelrc
{
  "plugins": [
    [
      "babel-plugin-library",
      {"libraryName": "tool-libraries"}
    ]
  ]
}
  • webpack
module: {
  rules: [{
    test: /\.js$/,
    loader: "babel-loader",
  }]
}

See the babel-plugin-library for more details.


Developer

In order to be compatible with the on-demand feature, each file must have a default export, and each function may be split into a single file, which helps to facilitate splitting when it is introduced.

Licence

MIT