snoozy

1.0.0-beta.1 • Public • Published

Snoozy

Snoozy is open-source lightweight utility library delivering modularity.

  • simple to use.
  • zero dependencies.
  • developer-friendly.
  • focus on high performance.

And of course, Snoozy itself is open source with a public repository on GitHub.

Installation

Snoozy requires Node.js v8+ to run.

$ npm i snoozy --save

Usage

const { crypt, dasher, logger, dater, validate } = require('snoozy');

Why Snoozy

Snoozy has useful function written for crypt, dash, logger, time and validate.

  • crypt (Basic and useful encryption functions.)
  • dash (Useful utility function for array and object operations and much more. )
  • logger (Colorful logs.)
  • dater (Useful date and time utility.)
  • validate (Regular data validation checker)

crypt

  • encryptPassword(password)
  • salt
  • base64ToBuffer
  • randomCode

dash

  • parse(jsonString)
  • stringify(json)
  • clone(json)
  • deepClone(json)
  • cloneObject(json)
  • cloneArray(json)
  • pick(object, [paths])
  • omit(object, [paths], deepCloneFlag:Boolean)
  • isEmptyObject(object)
  • toFloatFixed(number)
  • toString(data)
  • sortByKey(array, key)
  • randomizeArray(array)
  • randomBetween(min, max)
  • randomFromArray(array)
  • delay(ttl)
  • emptyCallback(error)
  • errorCallback(error)

logger

  • black(content)
  • red(content)
  • green(content)
  • yellow(content)
  • blue(content)
  • magenta(content)
  • cyan(content)
  • white(content)
  • console(content)
  • error(content)
  • warn(content)
  • table(content)
  • info(content)
  • trace(content)

dater

  • formattedDate()
  • isoTimeString()
  • getDate(date)
  • addDays(date, days)
  • addMilliseconds(date, milliseconds)

validate

  • isEmail()
  • isPassword()

License

MIT

Free Software, Hell Yeah!

Package Sidebar

Install

npm i snoozy

Weekly Downloads

1

Version

1.0.0-beta.1

License

ISC

Unpacked Size

12 kB

Total Files

10

Last publish

Collaborators

  • shivam_mishra
  • nikhil1337