{"_id":"observable","_rev":"287643","name":"observable","description":"A function as representation of a trackable mutable value.","dist-tags":{"latest":"2.1.4"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"time":{"modified":"2021-06-03T18:41:22.000Z","created":"2012-04-20T15:51:48.295Z","2.1.4":"2015-08-03T13:15:22.536Z","2.1.3":"2013-11-12T15:01:38.306Z","2.1.2":"2013-09-28T10:52:37.058Z","2.1.1":"2013-06-08T14:06:50.505Z","2.1.0":"2013-05-22T19:55:31.026Z","2.0.1":"2013-04-22T11:08:41.842Z","2.0.0":"2013-04-21T21:10:18.956Z","1.4.2":"2013-04-06T10:41:42.585Z","1.4.1":"2013-02-26T22:07:30.771Z","1.4.0":"2013-02-23T01:32:29.025Z","1.3.1":"2013-02-20T00:35:20.244Z","1.3.0":"2013-02-19T13:33:38.169Z","1.2.0":"2013-02-17T10:05:02.278Z","1.1.1":"2013-02-05T04:03:38.198Z","1.1.0":"2013-01-29T03:34:57.560Z","1.0.0":"2013-01-28T08:33:48.038Z","0.1.3":"2012-04-20T16:34:56.168Z","0.1.2":"2012-04-20T16:20:53.880Z","0.1.1":"2012-04-20T15:51:48.295Z"},"users":{"chalassa":true,"garrickajo":true},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"versions":{"2.1.4":{"name":"observable","version":"2.1.4","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~2.1.0"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"gitHead":"5ffb971eceb4e293b3c5b92af70cfe516b7bfe6b","description":"A function as representation of a trackable mutable value.","bugs":{"url":"https://github.com/dominictarr/observable/issues"},"_id":"observable@2.1.4","_shasum":"a0f6bff42ec1e0a069874a9b0c3d15f4cef43a34","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.3.1","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"dist":{"shasum":"a0f6bff42ec1e0a069874a9b0c3d15f4cef43a34","size":13630,"noattachment":false,"key":"/observable/-/observable-2.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.1.4.tgz"},"directories":{},"publish_time":1438607722536,"_cnpm_publish_time":1438607722536,"_hasShrinkwrap":false},"2.1.3":{"name":"observable","version":"2.1.3","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~2.1.0"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","testling":{"files":"test/*.js","browsers":["ie/8..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/5.1..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readmeFilename":"README.md","description":"A function as representation of a trackable mutable value.","bugs":{"url":"https://github.com/dominictarr/observable/issues"},"_id":"observable@2.1.3","dist":{"shasum":"d00e0080174fa614e26a837d30c5a371d596c2c8","size":29646,"noattachment":false,"key":"/observable/-/observable-2.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.1.3.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1384268498306,"_cnpm_publish_time":1384268498306,"_hasShrinkwrap":false},"2.1.2":{"name":"observable","version":"2.1.2","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","description":"A function as representation of a trackable mutable value.","bugs":{"url":"https://github.com/dominictarr/observable/issues"},"_id":"observable@2.1.2","dist":{"shasum":"c23ec4f76daf56713e8b694fb4c753afa16b6049","size":29400,"noattachment":false,"key":"/observable/-/observable-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.1.2.tgz"},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1380365557058,"_cnpm_publish_time":1380365557058,"_hasShrinkwrap":false},"2.1.1":{"name":"observable","version":"2.1.1","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@2.1.1","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"5aff26de8185c8756d09ce7322346ad7559d311a","size":29322,"noattachment":false,"key":"/observable/-/observable-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.1.1.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1370700410505,"_cnpm_publish_time":1370700410505,"_hasShrinkwrap":false},"2.1.0":{"name":"observable","version":"2.1.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@2.1.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"4a4d1ae1a0dae87878285be1914986e654e04a39","size":29329,"noattachment":false,"key":"/observable/-/observable-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.1.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1369252531026,"_cnpm_publish_time":1369252531026,"_hasShrinkwrap":false},"2.0.1":{"name":"observable","version":"2.0.1","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@2.0.1","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"f1ada506049b417e213cf90429ed2f002aea8ccb","size":29140,"noattachment":false,"key":"/observable/-/observable-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.0.1.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1366628921842,"_cnpm_publish_time":1366628921842,"_hasShrinkwrap":false},"2.0.0":{"name":"observable","version":"2.0.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@2.0.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"cfe5cf766ae03d9f083d57b6ef52d70799a05468","size":28882,"noattachment":false,"key":"/observable/-/observable-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-2.0.0.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1366578618956,"_cnpm_publish_time":1366578618956,"_hasShrinkwrap":false},"1.4.2":{"name":"observable","version":"1.4.2","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.4.2","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"6fe864da9f971f6a1f7f3503d3543004c4630e80","size":28520,"noattachment":false,"key":"/observable/-/observable-1.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.4.2.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1365244902585,"_cnpm_publish_time":1365244902585,"_hasShrinkwrap":false},"1.4.1":{"name":"observable","version":"1.4.1","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.4.1","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"e9781a6ee7dcd7d1934f04f365cf9360e9d74c35","size":28493,"noattachment":false,"key":"/observable/-/observable-1.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.4.1.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1361916450771,"_cnpm_publish_time":1361916450771,"_hasShrinkwrap":false},"1.4.0":{"name":"observable","version":"1.4.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.4.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"4188c44443e1b21c0bda2edc07ede78e3eebe0bb","size":28499,"noattachment":false,"key":"/observable/-/observable-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.4.0.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1361583149025,"_cnpm_publish_time":1361583149025,"_hasShrinkwrap":false},"1.3.1":{"name":"observable","version":"1.3.1","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.3.1","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"3d2a203b1430daf6a4d6d36f236cc13e6ed5bb4e","size":28347,"noattachment":false,"key":"/observable/-/observable-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.3.1.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1361320520244,"_cnpm_publish_time":1361320520244,"_hasShrinkwrap":false},"1.3.0":{"name":"observable","version":"1.3.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.3.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"1807dec6772d9d2f4b5a99a13c21871f0c558e3b","size":28351,"noattachment":false,"key":"/observable/-/observable-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.3.0.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1361280818169,"_cnpm_publish_time":1361280818169,"_hasShrinkwrap":false},"1.2.0":{"name":"observable","version":"1.2.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.2.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"3f778ad38739a687f8467f0734c12dfdea6be236","size":28346,"noattachment":false,"key":"/observable/-/observable-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.2.0.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1361095502278,"_cnpm_publish_time":1361095502278,"_hasShrinkwrap":false},"1.1.1":{"name":"observable","version":"1.1.1","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1","tape":"~0.2.2"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","readmeFilename":"README.md","_id":"observable@1.1.1","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"b317747f9327d226490155e42988dd3ecae41285","size":28330,"noattachment":false,"key":"/observable/-/observable-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.1.1.tgz"},"_from":".","_npmVersion":"1.2.3","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1360037018198,"_cnpm_publish_time":1360037018198,"_hasShrinkwrap":false},"1.1.0":{"name":"observable","version":"1.1.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{"hyperscript":"~1.0.1"},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","dependencies":{"tape":"~0.2.2"},"readmeFilename":"README.md","_id":"observable@1.1.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"054dc92eb3bc9409ae643d4f2cbdb81be2851a1b","size":28570,"noattachment":false,"key":"/observable/-/observable-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.1.0.tgz"},"_npmVersion":"1.1.70","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1359430497560,"_cnpm_publish_time":1359430497560,"_hasShrinkwrap":false},"1.0.0":{"name":"observable","version":"1.0.0","homepage":"https://github.com/dominictarr/observable","repository":{"type":"git","url":"git://github.com/dominictarr/observable.git"},"devDependencies":{},"scripts":{"test":"set -e; for t in test/*.js; do node $t; done"},"author":{"name":"Dominic Tarr","email":"dominic.tarr@gmail.com","url":"http://dominictarr.com"},"license":"MIT","dependencies":{"tape":"~0.2.2"},"readmeFilename":"README.md","_id":"observable@1.0.0","description":"A function as representation of a trackable mutable value.","dist":{"shasum":"92f5ed640f5385283610b19cb73ec7f1f664b467","size":22674,"noattachment":false,"key":"/observable/-/observable-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-1.0.0.tgz"},"_npmVersion":"1.1.70","_npmUser":{"name":"dominictarr","email":"dominic.tarr@gmail.com"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1359362028038,"_cnpm_publish_time":1359362028038,"_hasShrinkwrap":false},"0.1.3":{"name":"observable","version":"0.1.3","description":"Sychronized observables","author":{"name":"Raynos","email":"raynos2@gmail.com"},"dependencies":{"dnode":"0.9.9","node-uuid":"1.3.3","eventemitter-light":"0.2.2","pd":"0.6.3"},"devDependencies":{"browserify":"1.10.7","connect":"2.1.2","mocha":"1.0.1"},"_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"_id":"observable@0.1.3","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.9","_nodeVersion":"v0.6.13","_defaultsLoaded":true,"dist":{"shasum":"24506b2e801c4155bc40d2a0e1aec802aa1db644","size":67798,"noattachment":false,"key":"/observable/-/observable-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-0.1.3.tgz"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1334939696168,"_cnpm_publish_time":1334939696168,"_hasShrinkwrap":false},"0.1.2":{"name":"observable","version":"0.1.2","description":"Sychronized observables","author":{"name":"Raynos","email":"raynos2@gmail.com"},"dependencies":{"dnode":"0.9.9","node-uuid":"1.3.3","eventemitter-light":"0.2.2","pd":"0.6.3"},"devDependencies":{"browserify":"1.10.7","connect":"2.1.2","mocha":"1.0.1"},"_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"_id":"observable@0.1.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.9","_nodeVersion":"v0.6.13","_defaultsLoaded":true,"dist":{"shasum":"1d8c87b6563e9042b5c3ef45e0b8627af702ed22","size":67805,"noattachment":false,"key":"/observable/-/observable-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-0.1.2.tgz"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1334938853880,"_cnpm_publish_time":1334938853880,"_hasShrinkwrap":false},"0.1.1":{"name":"observable","version":"0.1.1","description":"Sychronized observables","author":{"name":"Raynos","email":"raynos2@gmail.com"},"dependencies":{"dnode":"0.9.9","node-uuid":"1.3.3","eventemitter-light":"0.2.2","pd":"0.6.3"},"devDependencies":{"browserify":"1.10.7","connect":"2.1.2","mocha":"1.0.1"},"_npmUser":{"name":"raynos","email":"raynos2@gmail.com"},"_id":"observable@0.1.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.9","_nodeVersion":"v0.6.13","_defaultsLoaded":true,"dist":{"shasum":"6b91e9c556b4b84c5270ed0d732f129deb7cf49c","size":67805,"noattachment":false,"key":"/observable/-/observable-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/observable/download/observable-0.1.1.tgz"},"maintainers":[{"name":"dominictarr","email":"dominic.tarr@gmail.com"},{"name":"raynos","email":""}],"directories":{},"publish_time":1334937108295,"_cnpm_publish_time":1334937108295,"_hasShrinkwrap":false}},"readme":"# observable\n\nA function as representation of a trackable mutable value.\n\n[![testling badge](https://ci.testling.com/dominictarr/observable.png)](https://ci.testling.com/dominictarr/observable)\n\n\n[Interactive Demo](http://dominictarr.github.com/observable)\n\nIt's basically just a `function` that can be called in 3 ways,\nIf an observable is called with no arguments `f()`, it returns the current value.\nIf it is called with an argument `f(value)`, it set that as the value.\n\n``` js\nvar o = require('observable')\nvar v = o()\n\n//set the value\nv(Math.random())\n\n//get the value\nv()\n```\n\nIf an observable is called with another function, it _calls_ that function with the new value, \nwhenever the value changes.\n\n```\nv(function(v){\n  console.log('Was changed to', v)\n})\n```\n\nAnd to stop being notifed of these changes, call the function that was returned\n\n```\nvar stop = v(function(v){\n  console.log('Was changed to', v)\n})\n// then some time later\nstop()\n```\n\n## value\n\n``` js\nvar o = require('observable')\nvar v = o()\n\nv(0)\n\nsetInterval(function () {\n  v(v() + 1)\n}, 500)\n\nv\n```\n\nHow is this demo updating in real-time like that?\nIt's because `observable` is integrated into \n[hyperscript](https://github.com/dominictarr/hyperscript)!\n\n## input, & transform\n\nobserve a input field, and transform it into different string.\nthis transformation is a one way observable.\n\n``` js\nvar o = require('observable')\nvar h = require('hyperscript')\nvar yourName\n  \nh('div', \n  h('h3', 'hello, what is your name?',\n    yourName = h('input', {placeholder: 'enter name'})\n  ),\n  h('h2', o.transform(o.input(yourName), function (v) {\n    return v ? 'Happy Birthday ' + v.toUpperCase() + ' !!!': ''\n  }), {style: {'font-family': 'Comic Sans MS'}})\n)\n```\n\nOh, wow! wasn't that easy! and we did a lot of things there!\n\n* made hyper text that updated in realtime\n* read from an input as you typed\n* transformed user input\n\nAnd there is many other cool things we can do to!\n\n# not\n\nInvert a boolean `observable`\n\n``` js\nvar o = require('observable')\nvar h = require('hyperscript')\nvar _i, i\nh('div',\n  _i = h('input', {type: 'checkbox'}),\n  'checked:', i = o.input(_i, 'checked', 'change'),\n  ' !checked:', o.not(i)\n)\n```\n\nHmm, I wonder if we could couple two things interms of each other?\n\n``` js\nvar o = require('observable')\nvar h = require('hyperscript')\nvar _i = h('input', {type: 'checkbox'})\nvar _j = h('input', {type: 'checkbox'})\nvar i = o.input(_i, 'checked', 'change')\nvar j = o.input(_j, 'checked', 'change')\n\n//just make i != j & j != i\ni(Math.random() < 0.5)\n\no.bind2(o.not(i), j)\n\nh('div', _i, _j)\n```\n\n## compute\n\nCompute a value from others, like a computed value in SQL.\n\n``` js\nvar o = require('observable')\nvar h = require('hyperscript')\nvar i, j\nh('div', \n  i = h('input', {placeholder: 'first name'}),\n  j = h('input', {placeholder: 'last name'}),\n  h('h1', 'Greetings, ',\n    o.compute([o.input(i), o.input(j)], function (f, l) {\n      return f + ' ' + l + (f && l ? ' !' : '')\n    })\n  )\n)\n```\n\n## hover & focus\n\n``` js\nvar h = require('hyperscript')\nvar o = require('observable')\n\nh('div', \n  strong = h('strong', {\n      contentEditable: true,\n      style:{display: 'inline-block'}\n    }, \n    \"editable thing\"\n  ),\n  h('ul', \n    h('li', 'focus: ', o.focus(strong)), \n    h('li', 'hover: ', o.hover(strong))\n  )\n)\n```\n\n## signal \n\nLike observable except only update listeners when the value actually changes.\n\n``` js\nvar s = require('observable').signal\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/dominictarr/observable","bugs":{"url":"https://github.com/dominictarr/observable/issues"},"license":"MIT"}