guid(count) | Using timestamp to generate a unique id, count provides length, default is 16 |
isObject(value) | Checks if value is a real javascript object |
isDate(value) | Checks if value is a date instance |
isFunction(value) | Checks if value is a method |
isAsyncFunction(value) | Checks if value is an async method |
isEmpty(value, type) | Checks if value is empty (undefined or null) type default is 'string', can be 'number', 'object', 'array' |
clone(obj) | Recursive true deep clone of an object |
random(min, max) | Random integer between min and max values (inclusive) |
shortNumber(value, options) | Converts number to short version: 12300000 = 1.23M, options: kilo: 'k', mega: 'M' |
formatNumber(value, options) | Formats the number based on options: decimalCount: 2, decimal: '.', thousands: ',' |
formatPhone(value) | Formats phone number |
clearPhone(value) | Clears phone formatting |
validPhone(value) | Checks if value is a valid phone |
validEmail(value) | Checks if value is a proper email address |
validUrl(value) | Checks if value is a proper url |
escapeRegExp(value) | Escapes special characters in value |
replaceAll(str, search, value) | Replaces all occurences string with another string |
toCamelCase(str) | converts to camel case format |
toTitleCase(str) | Converts to title case format |
toAccentFree(str) | Replaces all accent character with standard English one: ü = u, ó,ö.ő = o |
toVariable(str) | Converts to variable format |
format(value, args) | Formats text with variable points: format("Hello {0}, look {1}?", ['Jane', 'left']) |
clientInfo() | Returns with collected info from browser |
addToEvents(handlers, event) | Adds new "event" to handlers array |
callEvents(handlers, args) | Calls all elements of handlers array with args parameters |
callEvent(handler, args) | Calls a single handler method with arguments |
interval(callback, wait, times) | Alternative to setInterval. This one waits until previous cycle completed. |
hashToList(obj, selected) | Converting hash table to array of items with (value and text). If selected matches, then it will be added a selected: true to item. |