@delphi-imm/delphi-js-lib
v0.0.4
Published
This is a collection of small functions for daily Javascript/Typescript development created by Delphi IMM developers.
Downloads
16
Readme
delphi-js-lib
This is a collection of small functions for daily Javascript/Typescript development created by Delphi IMM developers.
Usage
npm i @delphi-imm/delphi-js-lib
- import functions like
import { getRandomNumber } from "@delphi-imm/delphi-js-lib";
Functions
Array
| function name | description |
| ----------------------------------------- | ----------------------------------------------------------------------------------- |
| moveItemInArrayFromTo(array,from,to)
| Move an item in an array from index to index |
| sortByAttribute(array, attr, direction)
| Sorting an array of objects by given attribute |
| toggleItemInArray(array,item)
| Function where a given item is added or removed (when already exists) from an array |
Helper
| function name | description |
| -------------------------------------------------- | ---------------------------------------------------------------- |
| germanNumberFormat(val,factor,digits,null_value)
| transformed a number value into a string in german number format |
| getRandomNumber(min,max)
| get a random number between min and max |
Object
| function name | description |
| ----------------------------- | ---------------------------- |
| deepEqual(object1, object2)
| Deeply comparing two objects |