npm

Don't miss out on this year's npm Pride t-shirt designs!Order your favorites here »

g-jslib

1.2.3 • Public • Published

g-jslib

Download g-jslib on npm

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

install

npm i g-jslib

Downloadsweekly downloads

80

version

1.2.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability