Skip to content

Instantly share code, notes, and snippets.

--experimental_extras (enable code compiled in via v8_experimental_extra_library_files)
type: bool default: false
--use_strict (enforce strict mode)
type: bool default: false
--es_staging (enable test-worthy harmony features (for internal use only))
type: bool default: false
--harmony (enable all completed harmony features)
type: bool default: false
--harmony_shipping (enable all shipped harmony features)
type: bool default: true
@cevek
cevek / 1.md
Last active January 17, 2017 06:52
() {
  
  :boom: console.log(234);
}
@cevek
cevek / jscost.md
Last active January 23, 2017 20:40

native string.js:

indexOf:

(s,t){
if((%IS_VAR(this)===null)||(this===(void 0)))🔶️throw 🔶️%make_type_error(17,"String.prototype.indexOf");
var u=(🔶️%_ToString(this));
s=(🔶️%_ToString(s));
var v=(🔶️%_ToInteger(t));
@cevek
cevek / obj arr.js
Last active January 26, 2017 15:47
function Node(kind) {
this.kind = kind;
}
var node = new Node(0);
var node1 = new Node(1);
node1.expression = node;
var node2 = new Node(2);
var orig = Common.Revealer.reveal;
Common.Revealer.reveal = function(revealable, omitFocus) {
console.log(revealable);
// console.log(Persistence.persistence.binding(uiSourceCode).fileSystem.url())
orig.apply(this, arguments);
}
function getRandomObj(i) {
switch (i % 5) {
case 0:
return {a: 1, b: i, c: 3, d: "abc", k: true};
case 1:
return {c: "sadf", k: false};
case 2:
return {a: null, b: 45};
case 3:
return {a: null, b: 45, c: 2, d: "Asdaf"};
--experimental_extras (enable code compiled in via v8_experimental_extra_library_files)
type: bool default: false
--use_strict (enforce strict mode)
type: bool default: false
--es_staging (enable test-worthy harmony features (for internal use only))
type: bool default: false
--harmony (enable all completed harmony features)
type: bool default: false
--harmony_shipping (enable all shipped harmony features)
type: bool default: true
import * as React from 'react';
interface AppProps {
urlParams: { name: string },
searchParams: { foo: string }
}
class App extends React.Component<AppProps, {}> {
}
interface ListProps {
copy('[playlist]\n'+AudioAddict.WP.channels.map((ch,i) => (ch=ch.channel ? ch.channel : ch,`File${i+1}=http://pub1.diforfree.org:8000/di_${ch.key}_hi\nTitle${i+1}=${ch.name}`)).join('\n\n') + `\n\nNumberOfEntries=${AudioAddict.WP.channels.length}\nVersion=2`)