0.0.3 • Published 9 years ago
penknife v0.0.3
Penknife
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.