This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
var luhnChk = (function (arr) { | |
return function (ccNum) { | |
var | |
len = ccNum.length, | |
bit = 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* performance-timing.js: Polyfill for performance.timing object | |
* For greatest accuracy, this needs to be run as soon as possible in the page, preferably inline. | |
* The values returned are necessarily not absolutely accurate, but are close enough for general purposes. | |
* @author ShirtlessKirk. Copyright (c) 2014. | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
(function (window) { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @preserve CORS (Cross-Origin Resource Sharing) library (https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) | |
* | |
* @author ShirtlessKirk copyright 2014 | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
/*jslint unparam: true */ | |
/*global define: false, module: false, require: false */ | |
(function (global, definition) { // non-exporting module magic dance | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @preserve FormData polyfill for IE < 10. See https://developer.mozilla.org/en/docs/Web/API/FormData and http://caniuse.com/#search=formdata | |
* | |
* @author ShirtlessKirk copyright 2015 | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
/*global define: false, module: false */ | |
/*jslint bitwise: true, continue: true, nomen: true */ | |
(function formDataModule(global, definition) { // non-exporting module magic dance | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @preserve dataset polyfill for IE < 11. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset and http://caniuse.com/#search=dataset | |
* | |
* @author ShirtlessKirk copyright 2015 | |
* @license WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
/*global define: false, module: false */ | |
/*jslint nomen: true, regexp: true, unparam: true */ | |
(function datasetModule(global, definition) { // non-exporting module magic dance | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill of ES5 Array methods for IE < 9 | |
*/ | |
/*global define: false, module: false */ | |
/*jslint bitwise: true, forin: true */ | |
(function arrayModule(definition) { // non-exporting module magic dance | |
'use strict'; | |
var | |
amd = 'amd', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill of DOMTokenList for IE < 9 | |
* Monkey patch of .add, .remove for IE 10 / 11, Firefox < 26 to support multiple arguments | |
* Monkey patch of .toggle for IE 10 / 11, Firefox < 24 to support second argument | |
*/ | |
/*global define: false, module: false */ | |
/*jslint nomen: true */ | |
(function domTokenListModule(global, definition) { // non-exporting module magic dance | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill of .addEventListener, .removeEventListener, DOMContentLoaded for IE < 9 | |
* CustomEvent for IE < 9 | |
* Monkey patch custom event for IE9 - 11 | |
*/ | |
/*global define: false, module: false */ | |
/*jslint bitwise: true, forin: true, sloppy: true */ | |
(function eventModule(global, definition) { // non-exporting module magic dance | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Polyfill of DOM4 methods | |
*/ | |
/*global define: false, module: false, console: false */ | |
/*jslint bitwise: true, forin: true */ | |
(function documentModule(global, definition) { // non-exporting module magic dance | |
'use strict'; | |
var | |
amd = 'amd', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @preserve Function.bind polyfill for IE8 | |
*/ | |
/*global define: false, module: false */ | |
(function functionModule(definition) { // non-exporting module magic dance | |
'use strict'; | |
var | |
amd = 'amd', | |
exports = 'exports'; // keeps the method names for CommonJS / AMD from being compiled to single character variable |
OlderNewer