Repository URL to install this package:
|
Version:
2.0.2 ▾
|
| __tests__ |
| dist |
| src |
| dist |
| Makefile |
| README.md |
| package.json |
| tsconfig.json |
| tsconfig.test.json |
| tsconfig.typings.json |
| tslint.json |
one way to handle all types of $ min, max, diff, string, number, array, object, precisions, formatting, types
// @example concept toString Money { currency: '$', type: 'sale', digits: 2, value: 40.00, difference = $ => Math.difference(toNumber(this), toNumber($)) } Entity.Moneys { differenceInPercent = ($1, $2) => $1.difference($2).toPercent() // two money Entities list = [Money, Money] //=> ['Sale', 'Reg'] types = () => keys(this.prices) //=> [Money] getPrice = 'sale' => this.find({type: 'sale'}) }