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
| Depots.load = function load (state, callback) { | |
| xhr('...', function (err, data) { | |
| if (err) return callback(err) | |
| state[arrayKey].set(data) | |
| callback(null, data) | |
| }) | |
| } | |
| // app.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
| return orders.reduce(function (accumlator, order) { | |
| accumulator.aggregates.count++ | |
| accumulator.aggregates.total += order.total | |
| accumulator.orders.push(order) | |
| return accumulator | |
| }, OrderStore()) | |
| function OrderStore () { | |
| 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 DeliveryController (injectables...) { | |
| var controller = { | |
| drivers: drivers, | |
| fetch: fetch | |
| } | |
| return controller | |
| function fetch () { | |
| return $http.get('drivers') |
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 dep = require('dep') | |
| module.exports = { | |
| myFn: myFn | |
| } | |
| function myFn (input) { | |
| var myVar = {} | |
| // ... |
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 getUrls (callback) { | |
| fs.readFile('./cache.json', function (err, data) { | |
| if (err && err.code !== 'ENOENT') return callback(err) | |
| getDataFromServer(function (err, data) { | |
| if (err) return callback(err) | |
| callback(null, data) | |
| fs.writeFile('./cache.json', JSON.stringify(data), noop) | |
| }) | |
| }) | |
| } |
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
| Verifying that +bendrucker is my blockchain ID. https://onename.com/bendrucker |
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
| Router.hook(route.profile, function (state) { | |
| state.put('profile', Profile()) | |
| }) | |
| Router.unhook(route.profile, function (state) { | |
| state.delete('profile') | |
| }) | |
| Router.hook(route.order, function (state, params, callback) { | |
| var order = Order({id: params.id}) |
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 Struct = require('observ-struct') | |
| var Email = require('email-input') | |
| var Password = require('password-input') // doesn't actually exist yet | |
| var value = require('observ-value') | |
| var h = require('virtual-dom/h') | |
| var when = require('value-when') | |
| function LoginForm (data) { | |
| data = data || {} | |
Droplr will auto-copy the sharing link when you take a screenshot. You'll use this on GitHub.
That copied link will look like this: http://d.pr/i/13PDt
To paste that into a GitHub issue:
