{"_id":"common","_rev":"27-915ce1c78794b1878933fd1327300131","name":"common","description":"A utility package with some useful functional stuff","dist-tags":{"latest":"0.2.5"},"versions":{"0.1.0":{"name":"common","version":"0.1.0","description":"A small utility package with some useful stuff","author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"main":"./index.js","_id":"common@0.1.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.8","dist":{"shasum":"500f1e33c728d3090642c6e8b97bcc658db3e6ca","tarball":"https://registry.npmjs.org/common/-/common-0.1.0.tgz","integrity":"sha512-KtUHvdTxpsl4RjyL0TcWtVelFaioCJXaZoRI/NigRQCwwhhgA7jK0thEe1NzYx5ipCHZkrzaW/FcGQeNtS4Lew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFdyFO+udWudNRa6NGotymTfZVaWeDt4EObKAboYoon6AiEAyYq0gtCXb0/OUwP5ZJzCpXUoMlFCadEsd20UzUtAbWY="}]}},"0.1.1":{"name":"common","version":"0.1.1","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_id":"common@0.1.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.8","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"a3572deddeea0c35edb8fc94e67bf0ce64f19f52","tarball":"https://registry.npmjs.org/common/-/common-0.1.1.tgz","integrity":"sha512-oaWWuX7daFmUK/eLDyDti2NFvRku+V5mX17zBTgigtp6BfxBMfLFl+JgOoYfxO41D073wHaaIyK3T/VSuAQ9Tg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAF66/hjaXaQVSgOlx8x8UDdJoQKJegNZIbP4sI4GDwqAiEAoyavXkM99oMJINFZPsl4J59kuZ83X/jOWAVpUNTUkT4="}]}},"0.1.2":{"name":"common","version":"0.1.2","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_npmJsonOpts":{"file":"/Users/maf/.npm/common/0.1.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"common@0.1.2","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"95d129c56dc9bd81bd5bec0ff88ac62dd6170865","tarball":"https://registry.npmjs.org/common/-/common-0.1.2.tgz","integrity":"sha512-kyCnWGIz4T1eIR5YNc6xnmkxYFC3qmbzd0OIFCQrjrcLN3zgkswys5Mxpgpt3JJLoMp3OE6w1ybRl2ilgvZ7Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjTfQS+eCsq1zeNnb82qluzueqYl+2zAJLxgxFeB9jtAiB6qsFzX8ynU6IYUIwH40CywUVgNbcuGl78OHWmY3Q63A=="}]},"scripts":{}},"0.1.3":{"name":"common","version":"0.1.3","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_npmJsonOpts":{"file":"/Users/maf/.npm/common/0.1.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"common@0.1.3","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"4a893fb2d57ff3af9a398ee085baff07926515ff","tarball":"https://registry.npmjs.org/common/-/common-0.1.3.tgz","integrity":"sha512-LHll5T3wZSHLtMyLrAqarzH0IPs77QAbuTYFCg2OOxl59YpyKWD5wIMRpsy7hTnDlXEL3ll8MM4ikU7FyOxmRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMd30k8fAhdWrm4kUIKM/u+iPMnj5eVOXRTqbLIDag+AiEA9S11jCGooc1OuQv8DcNbU7chS34CV/oklmz9FlTGChk="}]},"scripts":{},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"}]},"0.1.4":{"name":"common","version":"0.1.4","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_npmJsonOpts":{"file":"/Users/maf/.npm/common/0.1.4/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"common@0.1.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.15","_nodeVersion":"v0.4.9","_defaultsLoaded":true,"dist":{"shasum":"b8f2411cc0224a64032bcc7b778814d76e10bece","tarball":"https://registry.npmjs.org/common/-/common-0.1.4.tgz","integrity":"sha512-lv+5Vp3pbb8J3sqmuIZCu8xHLqcu7eMfuD5QDljiXGbBgOzKqelbCxOCW3K2sfnLvGb/HERR8m1XNgyd31sr8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyk+XJC/7DdpnSBKj21kccIrZsl3oH2vFUxwoNG/j+0wIge76gx+bwWKFT1JtsXIwhymcCUYHlOFyZNheYIuNw7/Y="}]},"scripts":{},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"}]},"0.2.0":{"name":"common","version":"0.2.0","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_npmJsonOpts":{"file":"/Users/maf/.npm/common/0.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"common@0.2.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"95dc43d3e53af23efb4579b35df710d81bf5f548","tarball":"https://registry.npmjs.org/common/-/common-0.2.0.tgz","integrity":"sha512-9JPL1Jaduo/31pQW0jRir2bUSHRg4KAzJkrL+dmCIcENCeTv/d540j6OOI1opwXBL9bXPz7REP9rt+2YSajn9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNRZoncsZ6ANK3Rjez+nWvUWlXNS08UuSorsGzo5d4ewIhAI8KGtaufM3gvw+yriOt6MVeBqcrUlfq9oecTjTQs/5+"}]},"scripts":{},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}]},"0.2.1":{"name":"common","version":"0.2.1","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","_npmJsonOpts":{"file":"/Users/maf/.npm/common/0.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"common@0.2.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.23","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"c537fb11aca1ce09c125d20e0033941bfc0a9454","tarball":"https://registry.npmjs.org/common/-/common-0.2.1.tgz","integrity":"sha512-nz15NPiAnhp7XZS9Be5mFVwextC5c6tK/udWbTyEq2bKdVnh5S0mOUUTRh6QcNWVgQtcMqvDywT/CNrLRTckHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZoGKUlKWFn3qbXrPndL/4VBQYPuKOpxvD9+gPcZ967AIhAL3HMlvun+6K5hNBJRICXmaXdauK8m6f6cu4lrKUnpYi"}]},"scripts":{},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}]},"0.2.3":{"name":"common","version":"0.2.3","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","readme":"# Common\nA utility module for both node.js and the browser.  \nIt is available through npm:\n\n\tnpm install common\n\nOr as minified js file for the browser:\n\n\t<script src='common.min.js'></script>\n\nThis module among other things contains a fork of [step](https://github.com/creationix/step) that also provides error handling\n\n``` js\ncommon.step([\n\tfunction(next) { // next is the last argument, except in the last handler\n\t\tfs.readFile(__filename, 'utf-8', next);\n\t},\n\tfunction(file) {\n\t\tconsole.log(file);\n\t}\n], function(err) {\n\t// any error received in a callback will be forwarded here\n});\n```\n\nIt also contains a shortcut to the `EventEmitter` prototype and a compatible implementation of this for the browser.\n\n``` js\nvar MyEmitter = common.emitter(function() {\n\tthis.foo = 42;\n});\n\nvar me = new MyEmitter();\n\nme.emit('foo', me.foo); // emits 'foo',42\n```\n\nThere is also a more general method for extending prototypes called `extend`:\n\n``` js\n// this prototype is the same as above\nvar MyEmitter = common.extend(events.EventEmitter, function() {\n\tthis.foo = 42;\n});\n```\n\nIf you want to use futures you can use the `future` function to create a future:\n\n``` js\nvar fut = common.future();\n\nfut.get(function(val) {\n\tconsole.log(val);\n});\nsetTimeout(function() {\n\tfut.put(42); // results in the previous .get being called and all future .get's will be called synchroniously\n}, 1000)\n```\n\nTo do string formatting you can use `format`:\n\n``` js\n// you can parse the arguments to a pattern one by one\ncommon.format('define {0} here', 'pattern'); // returns 'define pattern here'\n\n// or as a map or array\ncommon.format('define {foo} here', {foo:'pattern'}); // same as above\n```\nThere is a `log` method that just accepts the does the same as `format` except it prints out the result using `console.log` if available\n\nTo generate a simple weak symbols (often used when generating keys for a map) use `gensym`\n\n``` js\ncommon.gensym() // returns 's0'\ncommon.gensym() // returns 's1'\n```\n\nIf you instead of a weak symbol need a strong one use `uuid`:\n\n``` js\ncommon.uuid(); // returns a strong id, ex: ngDl6IdovME9JKvIxgED0FK1kzURxfZaCq48-0\n```\n\nCommon can also encode integers into alphanumerical notation using `encode`:\n\n``` js\ncommon.encode(1000); // returns G8\n```\n\nTo ensure that a method cannot be called more than once you can use the `once` function:\n\n``` js\nvar fn = common.once(function() {\n\tconsole.log('hello');\n});\n\nfn(); // prints hello\nfn(); // does nothing\n```\n\nBesides the above common implements two of the utilities mentioned in The Good Parts, `memoizer` and `curry`.  \n","readmeFilename":"README.md","_id":"common@0.2.3","dist":{"shasum":"f0930ffd7f63192d24cbb7251495c520c64d35c4","tarball":"https://registry.npmjs.org/common/-/common-0.2.3.tgz","integrity":"sha512-HItdIbNNMxl/WdAszXKySCYmqW/DFweChEsGX0WHCtqUxc71dF6DJiHwfnCD0glhEVP3Jkskqoq19Zz/nhY5hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCctg82ofTKAyd/8Vk3+hCu+vWaBGsj+nA76eu8Fr83NQIgaRl006XZGyK36KAt2HWihOlalS2w0mMbdU3sp/G+T30="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}]},"0.2.4":{"name":"common","version":"0.2.4","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"repository":{"type":"git","url":"git://github.com/gett/common.git"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","readme":"# Common\nA utility module for both node.js and the browser.  \nIt is available through npm:\n\n\tnpm install common\n\nOr as minified js file for the browser:\n\n\t<script src='common.min.js'></script>\n\nThis module among other things contains a fork of [step](https://github.com/creationix/step) that also provides error handling\n\n``` js\ncommon.step([\n\tfunction(next) { // next is the last argument, except in the last handler\n\t\tfs.readFile(__filename, 'utf-8', next);\n\t},\n\tfunction(file) {\n\t\tconsole.log(file);\n\t}\n], function(err) {\n\t// any error received in a callback will be forwarded here\n});\n```\n\nIt also contains a shortcut to the `EventEmitter` prototype and a compatible implementation of this for the browser.\n\n``` js\nvar MyEmitter = common.emitter(function() {\n\tthis.foo = 42;\n});\n\nvar me = new MyEmitter();\n\nme.emit('foo', me.foo); // emits 'foo',42\n```\n\nThere is also a more general method for extending prototypes called `extend`:\n\n``` js\n// this prototype is the same as above\nvar MyEmitter = common.extend(events.EventEmitter, function() {\n\tthis.foo = 42;\n});\n```\n\nIf you want to use futures you can use the `future` function to create a future:\n\n``` js\nvar fut = common.future();\n\nfut.get(function(val) {\n\tconsole.log(val);\n});\nsetTimeout(function() {\n\tfut.put(42); // results in the previous .get being called and all future .get's will be called synchroniously\n}, 1000)\n```\n\nTo do string formatting you can use `format`:\n\n``` js\n// you can parse the arguments to a pattern one by one\ncommon.format('define {0} here', 'pattern'); // returns 'define pattern here'\n\n// or as a map or array\ncommon.format('define {foo} here', {foo:'pattern'}); // same as above\n```\nThere is a `log` method that just accepts the does the same as `format` except it prints out the result using `console.log` if available\n\nTo generate a simple weak symbols (often used when generating keys for a map) use `gensym`\n\n``` js\ncommon.gensym() // returns 's0'\ncommon.gensym() // returns 's1'\n```\n\nIf you instead of a weak symbol need a strong one use `uuid`:\n\n``` js\ncommon.uuid(); // returns a strong id, ex: ngDl6IdovME9JKvIxgED0FK1kzURxfZaCq48-0\n```\n\nCommon can also encode integers into alphanumerical notation using `encode`:\n\n``` js\ncommon.encode(1000); // returns G8\n```\n\nTo ensure that a method cannot be called more than once you can use the `once` function:\n\n``` js\nvar fn = common.once(function() {\n\tconsole.log('hello');\n});\n\nfn(); // prints hello\nfn(); // does nothing\n```\n\nBesides the above common implements two of the utilities mentioned in The Good Parts, `memoizer` and `curry`.  \n","readmeFilename":"README.md","bugs":{"url":"https://github.com/gett/common/issues"},"_id":"common@0.2.4","dist":{"shasum":"ad3c683c4f398bec692a6aea4df6878224029cb1","tarball":"https://registry.npmjs.org/common/-/common-0.2.4.tgz","integrity":"sha512-07TcTIY154BCeZND1kFkaC6kJiMVzuNLLjyXxsE88nyNeo5WcgBM7/d/nSQyMvO0wobVrcl0Jj4A5+CwuhO6RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQtLjxCm2jFC6WLzSZaScwPu0fo2W9W+zWU68YakKt8gIhAO/wYCclbteA+rzrtfVvFr6leVJTXUqVIzHDNiRpxP+i"}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}]},"0.2.5":{"name":"common","version":"0.2.5","description":"A utility package with some useful functional stuff","author":{"name":"Ge.tt","email":"hello@ge.tt"},"repository":{"type":"git","url":"git://github.com/gett/common.git"},"contributors":[{"name":"Mathias Buus Madsen","email":"m@ge.tt"}],"main":"./index.js","readme":"# Common\nA utility module for both node.js and the browser.  \nIt is available through npm:\n\n\tnpm install common\n\nOr as minified js file for the browser:\n\n\t<script src='common.min.js'></script>\n\nThis module among other things contains a fork of [step](https://github.com/creationix/step) that also provides error handling\n\n``` js\ncommon.step([\n\tfunction(next) { // next is the last argument, except in the last handler\n\t\tfs.readFile(__filename, 'utf-8', next);\n\t},\n\tfunction(file) {\n\t\tconsole.log(file);\n\t}\n], function(err) {\n\t// any error received in a callback will be forwarded here\n});\n```\n\nIt also contains a shortcut to the `EventEmitter` prototype and a compatible implementation of this for the browser.\n\n``` js\nvar MyEmitter = common.emitter(function() {\n\tthis.foo = 42;\n});\n\nvar me = new MyEmitter();\n\nme.emit('foo', me.foo); // emits 'foo',42\n```\n\nThere is also a more general method for extending prototypes called `extend`:\n\n``` js\n// this prototype is the same as above\nvar MyEmitter = common.extend(events.EventEmitter, function() {\n\tthis.foo = 42;\n});\n```\n\nIf you want to use futures you can use the `future` function to create a future:\n\n``` js\nvar fut = common.future();\n\nfut.get(function(val) {\n\tconsole.log(val);\n});\nsetTimeout(function() {\n\tfut.put(42); // results in the previous .get being called and all future .get's will be called synchroniously\n}, 1000)\n```\n\nTo do string formatting you can use `format`:\n\n``` js\n// you can parse the arguments to a pattern one by one\ncommon.format('define {0} here', 'pattern'); // returns 'define pattern here'\n\n// or as a map or array\ncommon.format('define {foo} here', {foo:'pattern'}); // same as above\n```\nThere is a `log` method that just accepts the does the same as `format` except it prints out the result using `console.log` if available\n\nTo generate a simple weak symbols (often used when generating keys for a map) use `gensym`\n\n``` js\ncommon.gensym() // returns 's0'\ncommon.gensym() // returns 's1'\n```\n\nIf you instead of a weak symbol need a strong one use `uuid`:\n\n``` js\ncommon.uuid(); // returns a strong id, ex: ngDl6IdovME9JKvIxgED0FK1kzURxfZaCq48-0\n```\n\nCommon can also encode integers into alphanumerical notation using `encode`:\n\n``` js\ncommon.encode(1000); // returns G8\n```\n\nTo ensure that a method cannot be called more than once you can use the `once` function:\n\n``` js\nvar fn = common.once(function() {\n\tconsole.log('hello');\n});\n\nfn(); // prints hello\nfn(); // does nothing\n```\n\nBesides the above common implements two of the utilities mentioned in The Good Parts, `memoizer` and `curry`.  \n","readmeFilename":"README.md","bugs":{"url":"https://github.com/gett/common/issues"},"_id":"common@0.2.5","dist":{"shasum":"3c7182f678bd1e3681cd5cc348c759fe8dd22394","tarball":"https://registry.npmjs.org/common/-/common-0.2.5.tgz","integrity":"sha512-bjuztiY8Wcz2V9dPpa0XdF0unGWqAGsnyKDGV7g6xDcaZfpufRrxV35qhuhjwv1h0jEPeiCHWKAQFLj702jGnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdItp+AAnOI+7idkc+Aj7qSONAR/6z7wjx16Bk+907uwIgN/g/HttIn1g3gxON7S+Vpe/g6K7xJJv2RdQKMZGcsPI="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}]}},"maintainers":[{"name":"mafintosh","email":"m@ge.tt"},{"name":"ianjorgensen","email":"jorgensen.ian@gmail.com"}],"time":{"modified":"2022-06-13T06:35:35.163Z","created":"2011-06-18T11:43:19.591Z","0.1.0":"2011-06-18T11:43:20.059Z","0.1.1":"2011-06-22T20:17:36.556Z","0.1.2":"2011-07-23T18:22:43.620Z","0.1.3":"2011-08-03T23:20:23.188Z","0.1.4":"2011-08-06T15:26:13.234Z","0.2.0":"2011-08-31T17:12:33.062Z","0.2.1":"2011-08-31T17:28:47.085Z","0.2.3":"2013-05-23T07:33:29.210Z","0.2.4":"2013-08-15T09:05:42.272Z","0.2.5":"2013-08-21T12:33:01.123Z"},"author":{"name":"Ge.tt","email":"hello@ge.tt"},"users":{"fgribreau":true,"m42am":true,"alfeo92":true},"repository":{"type":"git","url":"git://github.com/gett/common.git"}}