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
module.exports = curry; | |
function curry (f) { | |
var arity = f.length; | |
var params = []; | |
var end = createEnd(f, arity); | |
return createCurried(params, arity, end); | |
} | |
function createEnd (f, arity) { |
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
┏( ˆ◡ˆ)┛ ┗(ˆ◡ˆ )┓ Welcome to the RaveJS debug party! ┏( ˆ◡ˆ)┛ ┗(ˆ◡ˆ )┓ | |
If you see some 404s for JSON files, that's ok! They'll go away when you build your app. | |
If the 404s are spoiling your debug party, the README.md shows how to evict them. | |
rave.js:4692 Rave REPL enabled! (experimental) | |
Available commands: | |
-> rave.dump() - returns rave's context to be viewed or manipulated. | |
-> rave.version() - shows rave's version. | |
-> rave.checkVersions() - checks if extensions are compatible. |
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 most = require('most'); | |
module.exports = filterGroup; | |
/** | |
* Filters each of a group (array) of streams via a predicate that | |
* compares each value passing through the group to the most recent | |
* value of every other stream in the group. | |
* @param {function (a, b): boolean} predicate compares the most | |
* recent value of a stream (a) to the current value passing through |
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
module.exports = compete; | |
/** | |
* Filter function to determine which of all multiplexed streams | |
* is currently winning. | |
* TODO: change this so that multiple streams can be winners, but | |
* don't use an array of winners. Perhaps inject another function? | |
*/ | |
function compete (identify, compare) { | |
var winner, wid; |
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
module.exports = Group; | |
Group.compete = compete; | |
function Group (equals, compare) { | |
this.equals = equals; | |
this.compare = compare; | |
} | |
Group.prototype = { |
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
export class Maybe { | |
constructor (f) { | |
this._run = f; | |
} | |
/** | |
* Transform the result of a maybe operation. | |
*/ | |
map (f) { |
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
$.each(itemList, function (which) { | |
// if dev passed an array | |
if ($.isArray(itemList)) | |
// use the 2nd arg as item name (1st arg is array index) | |
which = arguments[1]; | |
// check if we've already initialized this item | |
var already = doneMap[which]; | |
if (!already) |
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
cujo.js equivalent (in-browser): | |
file: myApp.view.LoginPanel.html | |
<div class="myapp-view-loginpanel"> | |
<span data-attach="greeting">${display.greeting}</span> | |
<a data-attach="action" href="{$config.loginUrl}">{$display.loginAction}</a> | |
</div> | |
logout version extends login version (inheritance defined in myApp.view.LogoutPanel.js: |
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
module PhantomVisit ( | |
Visit, | |
CallAhead, | |
Remote, | |
WalkIn, | |
Rsv, | |
callAhead, | |
remote, | |
walkIn, | |
rsv |
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
attributeMap: { | |
seconds: { | |
data: "seconds", | |
type: "no-dom" | |
}, | |
displaySeconds: { | |
source: "seconds", | |
deriver: "_displaySeconds", | |
type: "no-dom" | |
} |
OlderNewer