micro-fp-tools-js/README.md

35 lines
611 B
Markdown
Raw Normal View History

2022-02-05 18:14:35 +01:00
# fnTools
2022-02-04 07:31:49 +01:00
2022-02-05 18:14:35 +01:00
Simple functional functions common to any development in Typescript or JavaScript.
- **inc**: Increase the value of a `number`.
- **dec**: Decrease the value of a `number`.
- **range**: Returns an array with a sequence.
- **uniqValuesArray**: Creates a duplicate-free version of an array.
- **cloneJSON**: Clone JSON.
- **updateJSON**: Returns a JSON with an updated value.
## Example
```typescript
2022-02-05 18:15:27 +01:00
import * as fn from 'fnTools'
fn.range(4);
// [0, 1, 2, 3, 4]
2022-02-05 18:14:35 +01:00
```
## Compile
Install Typescript
2022-02-04 07:31:49 +01:00
```shell
2022-02-05 18:14:35 +01:00
npm install -g typescript
```
And build.
```shell
make build
````
Check 'dist' folder.