@micro-ux/micro-dash.isundefined
v0.13.0
Published
micro-dash offers a subset of lodash of the functionality found in [lodash](https://github.com/lodash/lodash) + additional useful utilities
Downloads
2
Readme
micro-dash ·
micro-dash offers a subset of lodash of the functionality found in lodash + additional useful utilities
Note: This is still work in progress
It is essentially a re-write of lodash (many things copied as is to keep the functionality intact) in an attempt to create a micro version of lodash that leverage on modern browser capabilities to make it more lightweight. This would also mean lesser/no support for legacy browsers.
Web optimized modules for individual methods
Each of the methods below are exported as an individual npm module (optimized for web). However, if you are planning to use this library in NodeJS environment you should be using the main @micro-ui/micro-dash library (optimized for node) instead. See section below for more details.
| Category | Method | Installation | Npm Module |
| -------- | ----------------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Object | isNull | yarn add @micro-ux/micro-dash.isnull
| |
| Object | isUndefined | yarn add @micro-ux/micro-dash.isundefined
| |
| Object | isUndefinedOrNull | yarn add @micro-ux/micro-dash.isundefinedornull
| |
| String | toLowerCase | yarn add @micro-ux/micro-dash.tolowercase
| |
| String | toUpperCase | yarn add @micro-ux/micro-dash.touppercase
| |
Note Implementation of other methods is still in progress
Example usage
import toLowerCase from '@micro-ux/micro-dash.tolowercase';
toLowerCase('Foo Bar');
Node optimized module - complete library
If you are planning to use this library in NodeJS env you can use the main @micro-ui/micro-dash library (optimized for node).
Installation
yarn add @micro-ux/micro-dash
Example usage
const { toLowerCase } = require('@micro-ux/micro-dash')
toLowerCase('Foo Bar');
Comparision with Lodash
Will not implement the following methods
micro-dash will not implement certain methods from lodash to keep the library simple & lightweight.
| Category | Lodash Method | Rationale | | -------- | ------------- | --------- | | String | _.lowerCase | TBD | | String | _.upperCase | TBD |
Contributing
Local setup
- Requirements
- Node version >= 10.13.0 webpack 5 requires at least Node.js 10.13.0 (LTS)
- install
yarn
- Steps
- clone the repo
- install node dependencies
cd micro-dash
yarn install
Unit Testing
- Run test cases with the command
yarn test
- Run specific test cases with
--testPathPattern
flag. Ex:yarn test --testPathPattern=src/isNull