Generic utility functions (Mixin Lodash)
☞ Javascript Tutorial for Absolute Beginners
☞ Modern JavaScript [ ES6, ES7, ES8 ] Crash Course
Installation
npm install mix-dash
Example Usage
var _ = ;
_; // return true
_; // return null
_; // return true
_; // return true_; // return true_; // return true_; // return true_; // return false
_;// return zero-to-hero-with-node-js
_;// return http://localhost:3000/cart?couponCode=def
_; // return 100K_; // return 9,89M
_; // return false_; // return true_; // return true
Convert seconds to hh:mm:ss javascript
_; // return 04:24:19
Number format
_; // return 10,000,000
Random date range
_;
Random String Password
//_.randomString(length, chars); //Chars Include//a: Include Lowercase ( e.g. abcdefgh )//A: Include Uppercase ( e.g. ABCDEFGH )//#: Include Numbers ( e.g. 123456789 )//!: Include Symbols ( e.g. @#$% ) _;// return: 6A7FFY1049EXH8CBF6GK _;// return: KFRnObQPuLmNyqMLnkiR _;// FRBmz3RBlzsF8b57WAe6 _;// return: R]]^[V0b'igJA<A[i7&F
Convert json key
var map = name : "id" amount : "total" reported : "updated" // date : "issued";var a = name : "Foo" amount: 55 reported : false date : "10/01/2001"; _; //{ id: 'Foo', total: 55, updated: false, date: '10/01/2001' }
Use with Vue
Vue;
Conversion between the bitcoin base unit (BTC) and other units (Satoshi, μBTC, ...)
//['BTC', 'mBTC', 'μBTC', 'bit', 'Satoshi', 'sat']_;_;// 500000000 _;_;// 0.0005