This file contains hidden or 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
| function currify(f) { | |
| return function _currify(flen, _f) { | |
| return (...args) => { | |
| var remaining = flen - args.length; | |
| return remaining <= 0 ? | |
| _f(...args) : | |
| _currify(remaining, (...args2) => _f(...args, ...args2)); | |
| }; | |
| }(f.length, f); | |
| } |
This file contains hidden or 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
| define(function(require) { | |
| var React = require('react'); | |
| var paramRegex = /__(\d)+/; | |
| var parser = new DOMParser(); | |
| var errorDoc = parser.parseFromString('INVALID', 'text/xml'); | |
| var errorNs = errorDoc.getElementsByTagName("parsererror")[0].namespaceURI; | |
| // turns the array of string parts into a DOM | |
| // throws if the result is an invalid XML document. |
This file contains hidden or 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
| Your name and email address were configured automatically based | |
| on your username and hostname. Please check that they are accurate. | |
| You can suppress this message by setting them explicitly: | |
| git config --global user.name "Your Name" | |
| git config --global user.email you@example.com | |
| After doing this, you may fix the identity used for this commit with: | |
| git commit --amend --reset-author |
This file contains hidden or 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
| var fn = function (x) { return x; } | |
| var test = function (x) { | |
| var a = fn(x); | |
| test = function (x) { | |
| return a + x; | |
| } | |
| return test.apply(this, arguments); |
This file contains hidden or 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
| var bad_entities = [ | |
| "quot","amp","apos","lt","gt","nbsp","iexcl", | |
| "cent","pound","curren","yen","brvbar","sect","uml","copy", | |
| "ordf","laquo","not","shy","reg","macr","deg","plusmn", | |
| "sup2","sup3","acute","micro","para","middot","cedil", | |
| "sup1","ordm","raquo","frac14","frac12","frac34", | |
| "iquest","Agrave","Aacute","Acirc","Atilde","Auml", | |
| "Aring","AElig","Ccedil","Egrave","Eacute","Ecirc", | |
| "Euml","Igrave","Iacute","Icirc","Iuml","ETH", | |
| "Ntilde","Ograve","Oacute","Ocirc","Otilde", |
This file contains hidden or 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
| /** | |
| * Callable objects in ES2015. | |
| * by Dmitry Soshnikov <dmitry.soshnikov@gmail.com> | |
| * MIT Style License | |
| */ | |
| class Callable extends Function { | |
| constructor() { | |
| super('(' + Callable.prototype.__call__ + ')();'); | |
| return this.bind(this); |
This file contains hidden or 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
| require "try-catch" | |
| try { | |
| function() | |
| error('oops') | |
| end, | |
| catch { | |
| function(error) | |
| print('caught error: ' .. error) |
This file contains hidden or 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 hidden or 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
| /*globals DOMImplementation, ActiveXObject */ | |
| if (!DOMImplementation.prototype.createDocument) { | |
| (function () { | |
| 'use strict'; | |
| var i, docObj, docObjType, | |
| docObjs = [ | |
| 'MSXML6.DOMDocument', 'MSXML5.DOMDocument', 'MSXML4.DOMDocument', | |
| 'MSXML3.DOMDocument', 'MSXML2.DOMDocument.5.0', 'MSXML2.DOMDocument.4.0', |
This file contains hidden or 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
| 'use strict'; | |
| /** | |
| * @class | |
| * @param {number} size | |
| */ | |
| export default class FixedList { | |
| constructor (size) { |