1 | # README #
|
2 |
|
3 | ## common-utils ##
|
4 |
|
5 | This is a library with common utility functions
|
6 |
|
7 | #### usage ####
|
8 | ```javascript
|
9 | const commonUtils = require('@kathondvla/sri-client/common-utils');
|
10 | ```
|
11 |
|
12 | #### interface ####
|
13 |
|
14 | * **generateUUID():** returns a generated uuid of version 4.
|
15 | * **splitPermalink(permalink):** returns an object with properties key (the key of the permalink) and path (the path of the permalink without the key)
|
16 | * **getKeyFromPermalink(permalink):** returns the key within the permalink
|
17 | * **getPathFromPermalink(permalink):** returns the pathe of the permalink without the key,
|
18 | * **parametersToString(href, parameters):** returns the full path for the combination of the base href and the object of parameters. The parameter names and values are URL encoded.
|
19 | * **strip$$Properties(object):** returns a copy of the object with all the properties that start with '$$' removed
|
20 | * **strip$$PropertiesFromBatch(batchArray):** returns a copy of the batchArray with all the properties of the body in the batch objects that start with '$$' removed |
\ | No newline at end of file |