package.json 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {
  2. "_args": [
  3. [
  4. "ready@~0.1.1",
  5. "D:\\work\\im"
  6. ]
  7. ],
  8. "_from": "ready@>=0.1.1 <0.2.0",
  9. "_id": "ready@0.1.1",
  10. "_inCache": true,
  11. "_installable": true,
  12. "_location": "/ready",
  13. "_npmUser": {
  14. "email": "ian@supershabam.com",
  15. "name": "supershabam"
  16. },
  17. "_npmVersion": "1.3.5",
  18. "_phantomChildren": {},
  19. "_requested": {
  20. "name": "ready",
  21. "raw": "ready@~0.1.1",
  22. "rawSpec": "~0.1.1",
  23. "scope": null,
  24. "spec": ">=0.1.1 <0.2.0",
  25. "type": "range"
  26. },
  27. "_requiredBy": [
  28. "/"
  29. ],
  30. "_resolved": "https://registry.npmjs.org/ready/-/ready-0.1.1.tgz",
  31. "_shasum": "d1d2ef47384e52d3c3fb7e3b7ab78bd347589b44",
  32. "_shrinkwrap": null,
  33. "_spec": "ready@~0.1.1",
  34. "_where": "D:\\work\\im",
  35. "author": {
  36. "email": "ian@supershabam.com",
  37. "name": "Ian Hansen"
  38. },
  39. "bugs": {
  40. "url": "https://github.com/supershabam/ready/issues"
  41. },
  42. "dependencies": {},
  43. "description": "mixin to add one-time ready event callback handler",
  44. "devDependencies": {
  45. "mocha": "~1.12.0",
  46. "should": "~0.6.3"
  47. },
  48. "directories": {
  49. "test": "test"
  50. },
  51. "dist": {
  52. "shasum": "d1d2ef47384e52d3c3fb7e3b7ab78bd347589b44",
  53. "tarball": "https://registry.npmjs.org/ready/-/ready-0.1.1.tgz"
  54. },
  55. "homepage": "https://github.com/supershabam/ready#readme",
  56. "keywords": [
  57. "ready",
  58. "once",
  59. "event"
  60. ],
  61. "license": "MIT",
  62. "main": "index.js",
  63. "maintainers": [
  64. {
  65. "email": "ian@supershabam.com",
  66. "name": "supershabam"
  67. }
  68. ],
  69. "name": "ready",
  70. "optionalDependencies": {},
  71. "readme": "ready\n=====\n\n[![Build Status](https://travis-ci.org/supershabam/ready.png)](https://travis-ci.org/supershabam/ready)\n\nNodeJS mixin to add one-time ready event\n\n## Purpose\nEvents are great. You should use events, but not for signaling ready! Ready implies state, and once you are ready, you stay ready.\n\nThis is a module for everyone who has bound an event handler.on('ready', function() {}) that doesn't execute because you added the handler after the 'ready' event already fired.\n\n## Warning\nIf you use this mixin, you must have 'ready', '_ready', and '_readyCallbacks' available on your class. Ready will stomp on these variables if you're trying to use them in your class.\n\n## Example\n```javascript\nvar ready = require('ready');\n\n// example class that uses Ready\nfunction MyClass() {\n this.someProperty = 'some value';\n}\nready.mixin(MyClass.prototype);\n\n// Normal class prototype functions\nMyClass.prototype.doSomeWork = function() {}; \n\n// Create a new class that uses ready mixin\nvar myClass = new MyClass();\n\n// Add callback for when myClass is ready\nmyClass.ready(function() {\n console.log('I am now ready');\n});\n\nmyClass.doSomeWork();\n\n// We are now ready, fire callbacks!\nmyClass.ready(true);\n\n// Adding a new callback once we're already ready gets executed immediately\nmyClass.ready(function() {\n console.log('I came late to the party, but I will still execute.');\n});\n\n// Ok, you can set the ready state to false now as well... for whatever reason\nmyClass.ready(false);\nmyClass.ready(function() {\n console.log('I will not fire until you set ready to true again.');\n});\n```\n",
  72. "readmeFilename": "README.md",
  73. "repository": {
  74. "type": "git",
  75. "url": "git://github.com/supershabam/ready.git"
  76. },
  77. "scripts": {
  78. "test": "mocha"
  79. },
  80. "version": "0.1.1"
  81. }