cl

common-lib

A collection of most commonly used functions in modern webapps

Showing:

Popularity

Downloads/wk

69

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

0

Size (min+gzip)

0.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

CommonLib

A collection of most commonly used functions in modern webapps

Installation

npm install --save common-lib

Usage

var CommonLib = require('common-lib');
CommonLib.functionName();

List of currently available functions

For getting the index of an element from an array.

getElementIndex(element, array);

For converting file size to human readable format.

humanFileSize(bytes,decimals);

For converting one digit to two.

makeTwoDigit(number);

For converting an associative array to index array.

convertToIndexArray(hash_array);

For getting value of a url params.

getURLParameter(param_name);

For getting the first letter of a string.

getFirstLetter(str);

For converting the bitrate to a readble format

formatebitrate(bits);

For converting 12 hour time to 24 hour time format.

twelve2twentyfour(int);

Contribution.

  • Fork the repo.
  • Add your functions to the index.js file.
  • Create a pull request with a proper note about the function.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100