1
1
# Onify Script Functions
2
2
3
- [ ![ Build latest] ( https://github.com/onify/script-functions/actions/workflows/build.yaml/badge.svg )] ( https://github.com/onify/script-functions/actions/workflows/build.yaml )
3
+ [ ![ Build latest] ( https://github.com/onify/flow- script-functions/actions/workflows/build.yaml/badge.svg )] ( https://github.com/onify/flow- script-functions/actions/workflows/build.yaml )
4
4
5
5
This library provides various functions for Node.js applications.\
6
6
The functions available are as follows:
@@ -12,27 +12,35 @@ The functions available are as follows:
12
12
## Installation
13
13
14
14
```
15
- npm install @onify/script-functions
15
+ npm install @onify/flow- script-functions
16
16
```
17
17
18
18
## Usage
19
19
20
+ ### Use in Onify Flow:
21
+ Use ` functions.* ` to access the functions present in this library.
22
+
23
+ ``` js
24
+ const result = functions .slugify (' sample onify' );
25
+ console .log (result); // output: sample-onify
26
+ ```
27
+
20
28
### Import the library:
21
29
22
30
##### Javascript
23
31
24
32
``` js
25
- const functions = require (' @onify/script-functions' );
33
+ const functions = require (' @onify/flow- script-functions' );
26
34
```
27
35
28
36
##### Typescript
29
37
30
38
``` ts
31
39
// import all functions
32
- import * as functions from ' @onify/script-functions' ;
40
+ import * as functions from ' @onify/flow- script-functions' ;
33
41
// or
34
42
// import specific functions
35
- import { slugify } from ' @onify/script-functions' ;
43
+ import { slugify } from ' @onify/flow- script-functions' ;
36
44
```
37
45
38
46
### Use the functions:
@@ -62,7 +70,7 @@ GUID string with the format `${string}-${string}-${string}-${string}-${string}`
62
70
### Example
63
71
64
72
``` ts
65
- import { generateUuid } from ' @onify/script-functions' ;
73
+ import { generateUuid } from ' @onify/flow- script-functions' ;
66
74
67
75
// ...
68
76
const id = generateUuid (); // generates random GUID
@@ -92,7 +100,7 @@ slugify(text: string): string
92
100
### Example
93
101
94
102
``` ts
95
- import { slugify } from ' @onify/script-functions' ;
103
+ import { slugify } from ' @onify/flow- script-functions' ;
96
104
97
105
// ...
98
106
const transformedText = slugify (' Hello World!' );
@@ -122,7 +130,7 @@ validateEmail(email: string): boolean
122
130
### Example
123
131
124
132
``` ts
125
- import { validateEmail } from ' @onify/script-functions' ;
133
+ import { validateEmail } from ' @onify/flow- script-functions' ;
126
134
127
135
// ...
128
136
const isValid = slugify (' sample@onify.co' );
0 commit comments