0.0.3 • Published 7 years ago

penknife v0.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Penknife

npm version

Utility functions that I can't be arsed to rewrite/lookup for every damn project.

Usage

var pen = new penknife.Pen();
pen.func();

Functions

getTodaysDate();

Get today's date with month name.

validateEmail(email);

Validates email.

validatePassword(password);

Validates password. Need to alter this to add settings, but not right now.

getParameterByName(qs);

Gets a URL querystring.

setCookie(name, value, mins), getCookie(name), deleteCookie(name)

Self explanatory cookie functions

generateId(length, type)

Generates an ID of length with type of alpha, numeric or alphanumeric. Defaults to 32 and alphanumeric.