This is a simple, generic utils library that,
- is written in a declarative style,
- aims to compensate the lack of practical usage of some utils library like Lodash,
- try to make pieces of codes smaller reusable blocks, and
- is written in and refractored from some frontend React projects.
Feel free to make a pull request or raise a ticket of any issue.
This library is supposed to be used in most modern frontend projects (not limited to React) or some backend Node projects. It is designed to separate each function as a individual module, so that it is easier to implement code splitting.
This library has major dependencies of:
- Node (LTS recommended, minimum v8.0)
- React 16
- lodash 4
Others should be fine. But feel free to report any dependencies issue.
Install using npm
or yarn
:
npm i --save simply-utils
yarn add simply-utils
- Import separately using ES6 module (Recommended. This uses code-splitting style and is most cost-effective.):
import isStr from 'simply-utils/string/isStr'
const isString = isStr('testing')
- Named import as a whole using ES6 module:
import utils from 'simply-utils'
const isString = utils.isStr('testing')
- Separate import using ES6 module:
import { isStr } from 'simply-utils'
const isString = isStr('testing')
- Import using CommonJS
const utils = require('simply-utils').default
No testing yet. Unit tests are planned to implement.
- Declarative programming
- Stateless, pure function
- Small code blocks (better controlling between 100-200 lines in a file)
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Michael Chan - Initial work - michchan
- Sandy Lau - Initial work - sandylau333
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details