- Remove labels. They clutter the syntax for no real gain compared to what PHP did.
- Replace with break and continue statements taking an optional positive integer (default 1), breaking that many loops out.
- Match statement (See match.js)
- [[call]] special property in object literal syntax.
- [[prototype]] special property in object literal syntax.
- 'self' lexical variable that refers to current object.
- 'self(integer n)' lexical function that refers to the nth highest object literal. This looks ugly, but that's intentional. Note that the integer passed must be a literal integer.
- Mixins via the [[prototype]] property being an array. First go through the prototype chain of the first object in the array. If not found, go through the second. Ect. ect. Until the end. If not found, the key is empty, and return undefined.
- irc://irc.mibbit.net/havvy
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
| macro m { rule { $v } => { $v } } | |
| let it = macro { | |
| rule { $name:lit { $body ... } } => { | |
| it($name, function () { | |
| $body ... | |
| }); | |
| } | |
| } |
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 util = require('util'); | |
| var ServerModule = function () { | |
| this.capabilities = {}; | |
| }; | |
| ServerModule.prototype.getModule = function () { | |
| return { |
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 keysWhere (obj, predicate) { | |
| return Object.keys(obj).reduce(function (acc, key) { | |
| if (predicate(key, obj[key])) { | |
| acc.push(key); | |
| } | |
| return acc; | |
| }, []); | |
| } |
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
| fez.js (*) | |
| test-src/ | |
| test-bdd.sjs (*) | |
| test/ | |
| node_modules/ | |
| fez/ | |
| fez-sweet.js/ | |
| plugin.js (*) | |
| node_modules/ | |
| sweet.js/ |
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 sinon = require('sinon'); | |
| var assert = require('better-assert'); | |
| var equal = require('deep-eql'); | |
| var inspect = require('util').inspect; | |
| var format = require('util').format; | |
| var debug = false; | |
| var logfn = debug ? console.log.bind(console) : function () {}; | |
| var logger = {debug: logfn, info: logfn, notice: logfn, warn: logfn, error: logfn}; |
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 post(url, values) { | |
| function add_input(name, value) { | |
| var input = document.createElement("input"); | |
| input.name = name; | |
| input.value = value; | |
| form.appendChild(input); | |
| } | |
| var form = document.createElement("form"); | |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChecVDc+Ydwqnri7ikD5fPFgPsY0xuD/XLYD9piJqWLQKyogEhWZqMoQ/eZEfRPuRjaoHfZ+9vjl29LSQgqSApamgANSefw6jpJw/AvVFcAe/fBn44x8tHWSrV0iTR4MSjEPnupnIALa1qq/MTcbmcGnuLKSj8VvjVXHiw1THk7ErjHV5P5lXvurw+KFznxiwqgx2NsWZAPEEhFPb+C2v/w/W+fQ7jZTq7AqYG1AHp/wOpG7dHDmgXxx3x5T1t6xMG1eMlsfhwBwgULCFGElv7Mgwglx+SkMtGKuEjSK2MKML/9nPIV0UPMWoBfYbQTJK5rDfS0ib6MtCgkI+TOmHN ryan.havvy@gmail.com |
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 config = require('./config/mibbit.json'); | |
| var Client = require('tennu').Client; | |
| new Client(config).connect(); |
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
| module.exports = function (delayedFn, period) { | |
| var queue = []; | |
| var queueEmpty = true; | |
| var interval; | |
| function consume () { | |
| if (queue.length === 0) { | |
| queueEmpty = true; | |
| clearInterval(interval); | |
| } else { |