g-jslib
v1.2.3
Published
The lightweight pure JavaScript library
Downloads
38
Maintainers
Readme
g-jslib
The lightweight pure JavaScript library.
Installation
$ npm install g-jslib
Modules
- LocalStorageMethods
- store(key, value)
- retrieve(key, defaultReturn)
- remove(key)
- removeAll()
- OwnObjectArray
- toJSONString(objectArray)
- toObjectArray(sJSON)
- findIndex(objectArray, sPropertyName, sPropertyValue)
- sortByAlphabet(objectArray, sPropertyName, order)
- sortByNumeric(objectArray, sPropertyName, order)
- filterByProperty(objectArray,sPropertyName,sSeekingValue)
- getMax(objectArray,sPropertyName)
- Utils
- convertStringToInterger(sNumber, fractionDigits)
- getRandomNumber(minNr, maxNr)
- String.prototype
- .toText()
- .limitWords(limitNumber)
- Array.prototype (Using only for object array)
- .toJSONString()
- .findIndexByProperty(sPropertyName, sPropertyValue)
- .sortByAlphabet(sPropertyName, orderKeyword)
- .sortByNumeric(sPropertyName, orderKeyword)
- .filterByProperty(sPropertyName, sSeekingValue)
- .getMax(sPropertyName)
Online demo
Using
Import the modules you need and String.prototype and Array.prototype are included automatic (recommendation):
import { LocalStorageMethods, OwnObjectArray } from 'g-jslib';
For only using String.prototype or Array.prototype (for object array):
import 'g-jslib';
Detail
You may want to view how to use this library on GitHub