12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- {
- "_args": [
- [
- "ready@~0.1.1",
- "D:\\work\\im"
- ]
- ],
- "_from": "ready@>=0.1.1 <0.2.0",
- "_id": "ready@0.1.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/ready",
- "_npmUser": {
- "email": "ian@supershabam.com",
- "name": "supershabam"
- },
- "_npmVersion": "1.3.5",
- "_phantomChildren": {},
- "_requested": {
- "name": "ready",
- "raw": "ready@~0.1.1",
- "rawSpec": "~0.1.1",
- "scope": null,
- "spec": ">=0.1.1 <0.2.0",
- "type": "range"
- },
- "_requiredBy": [
- "/"
- ],
- "_resolved": "https://registry.npmjs.org/ready/-/ready-0.1.1.tgz",
- "_shasum": "d1d2ef47384e52d3c3fb7e3b7ab78bd347589b44",
- "_shrinkwrap": null,
- "_spec": "ready@~0.1.1",
- "_where": "D:\\work\\im",
- "author": {
- "email": "ian@supershabam.com",
- "name": "Ian Hansen"
- },
- "bugs": {
- "url": "https://github.com/supershabam/ready/issues"
- },
- "dependencies": {},
- "description": "mixin to add one-time ready event callback handler",
- "devDependencies": {
- "mocha": "~1.12.0",
- "should": "~0.6.3"
- },
- "directories": {
- "test": "test"
- },
- "dist": {
- "shasum": "d1d2ef47384e52d3c3fb7e3b7ab78bd347589b44",
- "tarball": "https://registry.npmjs.org/ready/-/ready-0.1.1.tgz"
- },
- "homepage": "https://github.com/supershabam/ready#readme",
- "keywords": [
- "ready",
- "once",
- "event"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "ian@supershabam.com",
- "name": "supershabam"
- }
- ],
- "name": "ready",
- "optionalDependencies": {},
- "readme": "ready\n=====\n\n[](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",
- "readmeFilename": "README.md",
- "repository": {
- "type": "git",
- "url": "git://github.com/supershabam/ready.git"
- },
- "scripts": {
- "test": "mocha"
- },
- "version": "0.1.1"
- }
|