1.2.3 • Published 8 months ago

@zrgjs/utils v1.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Zrg's Utils

A collection of my utility functions written in Typescript.

Installation

Use the npm package manager.

npm install @zrgjs/utils

Usage

Import each function as needed.

import {function1, function2} from '@zrgjs/utils/lib'
// or 
const {function1, function2} = require('@zrgjs/utils/lib')

Functions

generateCsv

import {generateCsv} from '@zrgjs/utils/lib'

Generate a csv string from an Object with arrays of strings, where the key is the column title and all the strings from it's value array are the values from the same column.

Example:

{
  "title 1": ['value.t1.1', 'value.t1.2'],
  "title 2": ['value.t2.1', 'value.t2.2', 'value.t2.3']
}

Expected result:

title1,title2
value.t1.1,value.t2.1
value.t1.2,value.t2.2
,value.t2.3

All values can contain commas, it won't break the order.

generateGuid

import {generateGuid} from '@zrgjs/utils/lib/

Generate a 128-bit globally unique identifier.

1.2.3

8 months ago

1.2.2

8 months ago

1.2.1

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago