SJS (StratifedJS) support, inheriting from JS

This commit is contained in:
Tim Cuthbertson 2013-09-24 18:19:38 +10:00
commit 55c3623877
4 changed files with 321 additions and 0 deletions

View file

@ -0,0 +1,28 @@
var { each, map } = require('sjs:sequence');
var { get } = require('sjs:http');
function foo(items, nada) {
var component = { name: "Ace", role: "Editor" };
console.log("
Welcome, #{component.name}
".trim());
logging.debug(`Component added: $String(component) (${component})`);
console.log(`
Welcome, {${function() {
return { x: 1, y: "why?}"};
}()}
`.trim());
waitfor {
items .. each.par { |item|
get(item);
}
} and {
var lengths = items .. map(i -> i.length);
} or {
hold(1500);
throw new Error("timed out");
}
} // Real Tab.