0.1.4 • Published 5 years ago
@keisei/fluffy v0.1.4
Fluffy ·
Misc helpful functions to make your life better.
Installation
Using npm:
$ npm i -g npm
$ npm i @keisei/fluffy
Note: add --save if you are using npm < 5.0.0
using yarn:
$ yarn add @keisei/fluffy
Examples
We will have several examples soon. Here is the first one you get started.
import fluffy from '@keisei/fluffy';
function addOne(num = fluffy.require()) {
return num + 1;
}
// Also you can use
import { required } from '@keisei/fluffy';
function addOne(num = required()) {
return num + 1;
}
addOne(); // Uncaught TypeError
addOne(1); // Got 2
// You can pass error messages to give people a detailed description.
require('Please provide a valid parameter');
License
Fluffy is MIT licensed.