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
var $each, $every, aliases; | |
$each = Function.prototype.call.bind(Array.prototype.forEach); | |
$every = Function.prototype.call.bind(Array.prototype.every); | |
aliases = { | |
x: 'r', y: 'g', z: 'b', w: 'a' | |
}; | |
function f(dest, channels, aliases) { |
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
var accessorDescriptor, valueDescriptor; | |
accessorDescriptor = { | |
__proto__: null, | |
get: null, set: null, | |
enumerable: true, | |
configurable: true | |
}; | |
valueDescriptor = { |
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
function $private(object, property, descriptor) { | |
var getter = descriptor.get; | |
var setter = descriptor.set; | |
var value = descriptor.default; | |
var enumerable = Boolean(descriptor.enumerable) || false; | |
var configurable = Boolean(descriptor.configurable) || false; | |
var $descriptor = { |
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
/* | |
var Foo = { | |
__proto__: K, | |
method: function () {} | |
}; | |
var Bar = { | |
__proto__: Foo | |
}; |
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
/* | |
`if cond {}` | |
Brackets are mandatory, except when `if` is followed by specials keywords (return, break and continue) | |
``` | |
if cond return | |
if cond break [label] | |
if cond continue [label] |
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
/* | |
`unless cond {}` is equivalent to `if !(cond) {}` | |
Brackets are mandatory, except when `unless` is followed by specials keywords (return, break and continue) | |
``` | |
unless cond return | |
unless cond break [label] | |
unless cond continue [label] |
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
/* | |
`while cond {}` | |
Brackets are mandatory | |
The following syntaxes are also valid | |
`do {} while cond` | |
`while cond;` |
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
/* | |
`until cond {}` is equivalent to `while !(cond) {}` | |
Brackets are mandatory | |
The following syntaxes are also valid | |
`do {} until cond` | |
`until cond;` |
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
/* | |
``` | |
for var i = 0; i < length; i += 1 { | |
... | |
} | |
for var key in object { | |
... | |
} |
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
/* | |
Multiple expressions per case are allowed | |
The result of the matching case, or the optional default, is automatically returned | |
``` | |
var x = switch os { | |
case 'osx', 'ios': 'apple' | |
default: os |
OlderNewer