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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var Maybe = require("data.maybe"); | |
var f1 = function(input) { | |
console.log("f1"); | |
return null; | |
}; | |
var f2 = function(input) { | |
console.log("f2"); |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var most = require("most"); | |
var h = require("virtual-dom/h"); | |
var diff = require("virtual-dom/diff"); | |
var patch = require("virtual-dom/patch"); | |
var createElement = require("virtual-dom/create-element"); | |
var match = function(query) { | |
return function(evt) { |
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
[ | |
{ | |
"description": "Buy more beer", | |
"id": 1, | |
"priority": 1 | |
}, | |
{ | |
"description": "Order pizza", | |
"id": 2, | |
"priority": 1 |
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 = function() { | |
var browser = require("rest/browser"); | |
var mime = require("rest/interceptor/mime"); | |
var client = browser.wrap(mime, { mime: "application/json" }); | |
return client; | |
}; |
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 _ = require("lodash"); | |
module.exports = _.extend({ | |
$plugins: [ | |
require("wire/aop") | |
]}, | |
require("../resource/wire-spec"), { | |
bookListViewModel: { |
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 _ = require("lodash"); | |
module.exports = _.extend({ | |
$plugins: [ | |
require("wire/aop"), | |
require("msgs/wire"), | |
require("rest/wire")/*, | |
require("wire/debug")*/ | |
]}, |
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
{ | |
"name": "rave-wire-example", | |
"version": "0.0.0", | |
"description": "wire example", | |
"main": "app/run.js", | |
"authors": [ | |
"foxdonut <fdaoud@proinbox.com>" | |
], | |
"moduleType": [ | |
"amd" |
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
define({ | |
$plugins: [ | |
{ module: "wire/dom" }, | |
{ module: "wire/on" } | |
], | |
model: { module: "app/model" }, | |
getMenuOptions: { module: "app/get-menu-options" }, | |
mealSelect: { $ref: "dom!meal-select" }, | |
menuSelect: { $ref: "dom!menu-select" }, |
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
define({ | |
$plugins: [ | |
{ module: "wire/dom" }, | |
{ module: "wire/on" } | |
], | |
model: { module: "app/model" }, | |
getMenuOptions: { module: "app/get-menu-options" }, | |
mealSelect: { $ref: "dom!meal-select" }, | |
menuSelect: { $ref: "dom!menu-select" }, |
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
(ns sample (:require [clojure.data.xml :as data.xml] [clojure.java.io :as io])) | |
(defn get-contact-info | |
"Extract info from tag" | |
[content tag] | |
(-> (filter #(= tag (:tag %)) content) first :content first)) | |
(defn process-contact | |
"I don't do a whole lot." | |
[contact] |
NewerOlder