{"_id":"emit","_rev":"13-d43cc20de6c86a579ed89cf09bf4ef21","name":"emit","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.0":{"name":"emit","version":"0.0.0","author":{"url":"http://jed.is","name":"Jed Schmidt","email":"tr@nslator.jp"},"_id":"emit@0.0.0","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"homepage":"https://emitjs.org","dist":{"shasum":"a2038740627faa5625c2d7b530563761e117598e","tarball":"https://registry.npmjs.org/emit/-/emit-0.0.0.tgz","integrity":"sha512-Af00BQSf9v6uZm/FP/bxdADbtvSpb8He2MCVX7TVnX/3CAoWW+L2EBF6jXc79AXfLW1GT28re4wA8ckq207tYg==","signatures":[{"sig":"MEUCICV+gSlJgBPnFL+yp6dGgFJnqwRlJhUiyay6GvPMCEUJAiEA6yUNH7pxBtP08gfILXBjkP0sZXzKof73pzct5E/TYHc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"engines":{"node":"~0.6.2"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":""},"_npmVersion":"1.0.104","description":"A reactive toolkit for JavaScript","_nodeVersion":"v0.6.2","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.1":{"name":"emit","version":"0.0.1","keywords":["functional","reactive","emitter","emit"],"author":{"url":"http://jed.is","name":"Jed Schmidt","email":"tr@nslator.jp"},"_id":"emit@0.0.1","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"homepage":"https://emitjs.org","dist":{"shasum":"a5a7ba9763567c0ec674f2f8fc6ec15301fa740d","tarball":"https://registry.npmjs.org/emit/-/emit-0.0.1.tgz","integrity":"sha512-gVCTI/hN3hFxy4YobLWAgulcaYdb13NPO/48LQHOOgRmpJa0u8xhhNXDy4JkWu8GwdOtBEhTf4L2rERnsFeSTw==","signatures":[{"sig":"MEUCIB1dpF1HG4RxZn8w1jr8NHeZBIgirPPYCuI+3JNgCCIEAiEAv/3HQpJcDSmK6mLEqmsEaLWGNG/RRjT1A7CDIobLw1s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"engines":{"node":"~0.6.6"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"git://github.com/jed/emit.git","type":"git"},"_npmVersion":"1.1.0-beta-4","description":"A reactive toolkit for JavaScript","_nodeVersion":"v0.6.6","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"emit","version":"0.0.2","keywords":["functional","reactive","emitter","emit"],"author":{"url":"http://jed.is","name":"Jed Schmidt","email":"tr@nslator.jp"},"_id":"emit@0.0.2","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"homepage":"https://emitjs.org","dist":{"shasum":"51c3bde194beb5102ff341ae9a754bf14e8f048f","tarball":"https://registry.npmjs.org/emit/-/emit-0.0.2.tgz","integrity":"sha512-qRCRwOWy5KfX8PO+K1i2EfzMjJU2dVkWMwd1l3FjF/JFpuWpV/vxSDqZdFQanL+Tzfre4NIQg6NTLgPOrx9Kkw==","signatures":[{"sig":"MEQCIBauSxexzWTonH9GUND69gcOQ0Vfzn1y8YJCVg/GItAOAiAYAVmGGSUfpRUK7LU5Oi1N/Frozrr21OjTh0hzsXV1mg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"engines":{"node":"~0.6.6"},"_npmUser":{"name":"jed","email":"tr@nslator.jp"},"repository":{"url":"git://github.com/jed/emit.git","type":"git"},"_npmVersion":"1.1.0-beta-4","description":"A reactive toolkit for JavaScript","_nodeVersion":"v0.6.6","dependencies":{},"_defaultsLoaded":true,"devDependencies":{},"_engineSupported":true,"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2011-11-30T05:20:49.698Z","modified":"2025-10-29T03:01:27.074Z","0.0.0":"2011-11-30T05:20:53.193Z","0.0.1":"2011-12-27T21:15:09.138Z","0.0.2":"2011-12-28T01:44:47.466Z"},"author":{"url":"http://jed.is","name":"Jed Schmidt","email":"tr@nslator.jp"},"repository":{"url":"git://github.com/jed/emit.git","type":"git"},"description":"A reactive toolkit for JavaScript","keywords":["functional","reactive","emitter","emit"],"homepage":"https://emitjs.org","maintainers":[{"name":"jed","email":"tr@nslator.jp"}],"readme":"(  ( (emit) )  )\n================\n\n(emit) is a [functional reactive programming][frp] toolkit based on JavaScript primitives, allowing you to compose functional applications using the APIs you already know.\n\n(emit) is a very rough work in progress. It can run both in the browser and on [node.js][node].\n\nExample\n-------\n\n```javascript\nemit = require(\"emit\")\n\n// emit method APIs are identical to their native counterparts...\nMath.pow(2, 2)       // 4\nemit.Math.pow(2, 2)  // 4\n \nArray(1, 2, 3)       // [1, 2, 3]\nemit.Array(1, 2, 3)  // [1, 2, 3]\n \n1 / 2                // .5\nemit.ops[\"/\"](1, 2)  // .5\n\n// with one exception: emit methods can also take functions, which are\n// treated as yet-unevaluated values that can be \"watched\". All emit\n// methods compose these (possibly unevaluated) values into a single\n// value; if any of these values are functions, the returned value will\n// also be a function.\n\n// Here's an example of such a function; it reports an incremented number\n// back to its listener every second.\nfunction count(cb) {\n  var send = function(){ cb(null, i++) }\n  \t, i = 0\n\n  send()\n  setInterval(send, 1000)\n}\n\n// Since the value reported by count changes every second, so does\n// the value of any method that uses it. So these are all functions:\nemit.Math.pow(2, count)  // [Function]\nemit.Array(1, 2, count)  // [Function]\nemit.ops[\"/\"](1, count)  // [Function]\n\n// We can observe these changing values through the console.\nfunction log(e, data){ console.log(e || data) }\n\nemit.Math.pow(2, count)(log)  // 1, 2, 4, 8, 16, 32...\nemit.Array(1, 2, count)(log)  // [1, 2, 0], [1, 2, 1], [1, 2, 2]...\nemit.ops[\"/\"](1, count)(log)  // Infinity, 1, .5, .25...\n\n// Now we can now start to compose these into increasingly\n// complex values.\nrandom   = emit.Math.random(ping)\nrandBin  = emit.Math.round(random)\ncoinToss = emit.ops[\"?:\"](randBin, \"heads\", \"tails\")\nmessage  = emit.ops[\"+\"](\"The coin landed on \", coinToss)\n\nmessage(log)  // \"The coin landed on heads\"\n              // \"The coin landed on tails\"\n              // \"The coin landed on heads\"\n              // ...\n```\n\nInstallation\n------------\n\nTo install, head to your terminal and enter:\n\n    npm install emit\n\nSupport\n-------\n\n### Current\n\n- `Array`: all ES3/ES5 methods\n- `Function`: `apply`, and `call`\n- `Math`: all statics and function\n- operators: most accessors, including `!`, `~`, `typeof`, `void`, `*`, `/`, `%`, `+`, `-`, `<<`, `>>`, `>>>`, `<`, `<=`, `>`, `>=`, `==`, `!=`, `===`, `!==`, `&`, `^`, `|`, `&&`, `||`, `, `, `?:`, `[]`, and `in`\n\n### Planned\n\n- RegExp, String, Date, Number, Boolean\n- Function::bind\n- DOM/HTML\n- DOM events\n- JSON\n- node.js file system, etc.\n\nLicense\n-------\n\nCopyright (c) 2012 Jed Schmidt, http://jed.is/\n \nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n \nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n \nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[frp]: http://en.wikipedia.org/wiki/Functional_reactive_programming\n[node]: http://nodejs.org/\n[flapjax]: http://www.flapjax-lang.org/\n[tangle]: http://worrydream.com/Tangle/\n[spreadsheet]: http://en.wikipedia.org/wiki/Spreadsheet","readmeFilename":""}