0.1.12 • Published 2 years ago

nodejs-util-lib v0.1.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

NodeJS Utility Library

Node.js Package CodeQL Test

Available Utility Types:

  • String Utilities
  • Timer Utilities

Usage Example:

const { 
  StringUtils, 
  TimerUtils
} = require('nodejs-util-lib');

String Utility Functions:

contains(value, match, caseSensitive=false) - Checks if a string contains another string.

isEmpty(value, ignoreWhiteSpace=false) - Checks if a value is undefined, null or empty.

prettyPrintJSON(object, spacing=2) - Returns an object as a nice string formatted JSON string.

replaceAll(value, valueToReplace, replaceWith) - Replaces all matched values of a string.

splitAndTrimString(value, delimiter=',') - Splits a string delimited list of strings into an array.

Timer Utility Functions:

formatTime(milliseconds) - Converts a time in milliseconds to a nice formatted string.

getTimeDifferenceString(start, end=Date.now()) - Used to nicely print the time difference between 2 times(milliseconds).

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.7

4 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago