I hereby claim:
- I am ruiramos on github.
- I am ruiramos (https://keybase.io/ruiramos) on keybase.
- I have a public key ASCKDnmBgn3g9-b0wwMB8-wmq3ao9Y2FIkQMUouET-k4Cwo
To claim this, I am signing this object:
| let a = [null, {status: 'OK'}]; | |
| switch_( | |
| (err, _) => console.log('error', err), | |
| (_, resp) => console.log('response', resp) | |
| )(a); | |
| // logs 'response' { "status": "OK" } | |
| let b = [{err: 401}, null]; |
I hereby claim:
To claim this, I am signing this object:
| requestAction: function(action, method, options){ | |
| var unMapMethod = { | |
| POST: 'create', | |
| PUT: 'update', | |
| DELETE: 'delete', | |
| GET: 'read' | |
| }; | |
| // calls ampersand sync | |
| this.sync(unMapMethod[method], this, _.extend({ |
| var State = require('ampersand-state'); | |
| var Collection = require('ampersand-collection') | |
| var Person = State.extend({ | |
| props: { | |
| name: 'string', | |
| birthdate: 'date', | |
| job: {type: 'string', default: 'Web Developer'}, | |
| }, |
| // require() some stuff from npm (like you were using browserify) | |
| // and then hit Rebuild to run it on the right | |
| var State = require('ampersand-state'); | |
| var MyState = State.extend({ | |
| props: { | |
| 'arriving': ['object', false, function(){ | |
| return {hello: 'there!'} | |
| }], | |
| 'leaving': ['string', false, 'bye!'] |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <div id="out"></div> | |
| </body> |