package.json 3.0 KB
{
  "_args": [
    [
      {
        "raw": "component-bind@1.0.0",
        "scope": null,
        "escapedName": "component-bind",
        "name": "component-bind",
        "rawSpec": "1.0.0",
        "spec": "1.0.0",
        "type": "version"
      },
      "/Users/fzy/project/3mang/node_modules/socket.io-client"
    ]
  ],
  "_from": "component-bind@1.0.0",
  "_id": "component-bind@1.0.0",
  "_inCache": true,
  "_location": "/component-bind",
  "_npmUser": {
    "name": "tootallnate",
    "email": "nathan@tootallnate.net"
  },
  "_npmVersion": "1.4.9",
  "_phantomChildren": {},
  "_requested": {
    "raw": "component-bind@1.0.0",
    "scope": null,
    "escapedName": "component-bind",
    "name": "component-bind",
    "rawSpec": "1.0.0",
    "spec": "1.0.0",
    "type": "version"
  },
  "_requiredBy": [
    "/socket.io-client"
  ],
  "_resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
  "_shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1",
  "_shrinkwrap": null,
  "_spec": "component-bind@1.0.0",
  "_where": "/Users/fzy/project/3mang/node_modules/socket.io-client",
  "bugs": {
    "url": "https://github.com/component/bind/issues"
  },
  "component": {
    "scripts": {
      "bind/index.js": "index.js"
    }
  },
  "dependencies": {},
  "description": "function binding utility",
  "devDependencies": {
    "mocha": "*",
    "should": "*"
  },
  "directories": {},
  "dist": {
    "shasum": "00c608ab7dcd93897c0009651b1d3a8e1e73bbd1",
    "tarball": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz"
  },
  "homepage": "https://github.com/component/bind#readme",
  "keywords": [
    "bind",
    "utility"
  ],
  "maintainers": [
    {
      "name": "tootallnate",
      "email": "nathan@tootallnate.net"
    }
  ],
  "name": "component-bind",
  "optionalDependencies": {},
  "readme": "# bind\n\n  Function binding utility.\n\n## Installation\n\n```\n$ component install component/bind\n```\n\n## API\n\n   - [bind(obj, fn)](#bindobj-fn)\n   - [bind(obj, fn, ...)](#bindobj-fn-)\n   - [bind(obj, name)](#bindobj-name)\n<a name=\"\"></a>\n \n<a name=\"bindobj-fn\"></a>\n### bind(obj, fn)\nshould bind the function to the given object.\n\n```js\nvar tobi = { name: 'tobi' };\n\nfunction name() {\n  return this.name;\n}\n\nvar fn = bind(tobi, name);\nfn().should.equal('tobi');\n```\n\n<a name=\"bindobj-fn-\"></a>\n### bind(obj, fn, ...)\nshould curry the remaining arguments.\n\n```js\nfunction add(a, b) {\n  return a + b;\n}\n\nbind(null, add)(1, 2).should.equal(3);\nbind(null, add, 1)(2).should.equal(3);\nbind(null, add, 1, 2)().should.equal(3);\n```\n\n<a name=\"bindobj-name\"></a>\n### bind(obj, name)\nshould bind the method of the given name.\n\n```js\nvar tobi = { name: 'tobi' };\n\ntobi.getName = function() {\n  return this.name;\n};\n\nvar fn = bind(tobi, 'getName');\nfn().should.equal('tobi');\n```\n\n## License \n\n  MIT",
  "readmeFilename": "Readme.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/component/bind.git"
  },
  "version": "1.0.0"
}