UNPKG

elsewhere

Version:

A node project that aims to replicate the functionality of the Google Social Graph API

51 lines (50 loc) 4.46 kB
{ "name": "underscore.deferred", "description": "jQuery style Deferreds", "version": "0.1.5", "homepage": "https://github.com/wookiehangover/underscore.deferred", "author": { "name": "Sam Breed", "email": "sam@quickleft.com" }, "repository": { "type": "git", "url": "git://github.com/wookiehangover/underscore.deferred.git" }, "bugs": { "url": "https://github.com/wookiehangover/underscore.deferred/issues" }, "licenses": [ { "type": "MIT", "url": "https://github.com/wookiehangover/underscore.deferred/blob/master/LICENSE-MIT" } ], "engines": { "node": "*" }, "scripts": { "test": "grunt qunit" }, "dependencies": {}, "devDependencies": { "grunt": "~0.3.9", "rimraf": "~2.0.1", "underscore": "*", "mocha": "*" }, "keywords": [ "underscore deferreds", "deferreds", "underscore", "flow-control", "deferred", "ender" ], "main": "./underscore.deferred.js", "ender": "./lib/ender.js", "readme": "# Underscore.Deferred\n\n[![Build Status](https://secure.travis-ci.org/wookiehangover/underscore.deferred.png?branch=master)](http://travis-ci.org/wookiehangover/underscore.deferred)\n\nv0.1.5\n\n**Please note that as of 0.1.4 underscore.deferred will be ALL LOWERCASE on\nnpm.** The camelcasing was a mistake from the outset, please update your\n`package.json` appropriately.\n\nThis is a port of jQuery.Deferred as an Underscore mixin, but it can be\nused without any depencencies. It currently matches the Deferred specifications\nand implementation from jQuery 1.7.2, with all the associated helpers.\n\n## Deferred's are great, let's take them everywhere\n\njQuery offers a robust, consistent and well documented API; this project aims\nto make it portable. jQuery added a handful of helper methods to their\nimplementation of the [Common.js Promises Spec][promise], and they're faithfully\nreproduced without any dependencies.\n\nunderscore.deferred provides complete pairity with the jQuery Deferred\nAPI. Here are some of the method implemented:\n\n* [always](http://api.jquery.com/deferred.always/)\n* [done](http://api.jquery.com/deferred.done/)\n* [fail](http://api.jquery.com/deferred.fail/)\n* [notify](http://api.jquery.com/deferred.notify/)\n* [notifyWith](http://api.jquery.com/deferred.notifywith/)\n* [pipe](http://api.jquery.com/deferred.pipe/)\n* [promise](http://api.jquery.com/deferred.promise/)\n* [resolve](http://api.jquery.com/deferred.resolve/)\n* [reject](http://api.jquery.com/deferred.reject/)\n* [state](http://api.jquery.com/deferred.notifywith/)\n* [then](http://api.jquery.com/deferred.then/)\n\nFor the complete API documentation, look to the [jQuery Docs][jquery-docs].\n\n## Usage\n\nunderscore.deferred works on the server and in the browser.\n\nIn the browser, just require it like you would any other file. If you're\nincluding Underscore on the page, make sure you include it before\nunderscore.deferred. If you don't have Underscore, the plugin attaches to\n`window._`.\n\nAddionally, underscore.Deferred can be used with the [Ender.js build\ntool][ender], if you're into that sort of thing.\n\nOn the server, simply install via npm and require normally. If you'd like to\nuse it as an Underscore module, just do this:\n\n var _ = require('underscore')._\n _.mixin( require('underscore.deferred') );\n\nBut keep in mind that Underscore is not a strict requirement, and assigning it\nto another namespace will always work.\n\n## Build\n\nOne time setup command:\n\n```\n$ npm install\n```\n\nTo build with [grunt](https://github.com/cowboy/grunt)\n\n```\n$ node build\n```\n\nTo run headless Qunit tests (must have phantomjs in your path)\n\n```\n$ node build qunit\n```\n\n## Contributors\n\n* [rwldrn](https://github.com/rwldrn)\n* [tbranyen](https://github.com/tbranyen)\n* [taxillian](https://github.com/taxilian)\n* [danheberden](https://github.com/danheberden)\n\n## Roadmap\n\nThe goal is to slim the code footprint for robust deferreds as much as\npossible while maintaining mixin integration with Underscore and faithfullness\nto the jQuery API.\n\nThis is a work in progress, feel free to contribute.\n\nMIT License.\n\n[promise]: http://wiki.commonjs.org/wiki/Promises\n[jquery-docs]: http://api.jquery.com/category/deferred-object/\n[ender]: http://ender.no.de/\n", "readmeFilename": "readme.md", "_id": "underscore.deferred@0.1.5", "_from": "underscore.deferred@0.1.x" }