add readme
This commit is contained in:
parent
145bfa5c3d
commit
ff949155d0
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Utilities
|
||||||
|
|
||||||
|
General helper functions
|
||||||
|
|
||||||
|
```
|
||||||
|
const util = require('@scode/utilities');
|
||||||
|
|
||||||
|
// cut off decimal places to a specified point
|
||||||
|
util.truncate_decimal(12.345678, 2);
|
||||||
|
// returns 12.34
|
||||||
|
|
||||||
|
// will return null instead of throwing on invalid json
|
||||||
|
util.try_parse_json('{{foo');
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user