1.0.6 • Published 7 years ago
cms7-jquery
Licence
ISC
Version
1.0.6
Deps
2
Size
15 kB
Vulns
0
Weekly
0
jQuery & javascript extensions
Adds following to window variable:
log: which is a shortcut for console.log
$ and jQuery: the jquery's famous $ and jQuery variable
stackTrace function() -> Error: returns an error object containing current stack trace
logStackTrace function() -> void: prints current stack trace in console
Adds the following methods to any jQuery variable:
hasAttr function (name) -> Boolean: checks if a jquery object has the given attribute.
$('.test').hasAttr('id')
equals function(jQueryObject) -> Boolean: checks if a jquery object equals the given jquery object.
$('.test').equals($('.test'))
outerHTML function() -> String: returns the jquery object's outer html.
$('.test').outerHTML()
Adds the following methods to javascript Number:
padZero function(size) -> String: inserts 0s before a number until the length is equal to size parameter
var x = 123;
x.padZero(5)
prints: 00123format function(separator = ',') -> String: thousand separator for mostly currencies
var x = 123000;
x.format('/')
prints: 123/000
Adds the following methods to javascript String:
format function(templateString, ...args): just like c# String.format
String.format('Hi, {0}', 'Akbar')
prints: Hi, Akbar
Adds the following to FormData:
print function() -> String: prints FormData object
put function(object) -> FormData: puts all properties of object recursively into FormData