{"_id":"class-autobind","_rev":"8-e9e9de5f419601902c81a9d7ff61bbbd","name":"class-autobind","description":"Method auto-bind for ES6 (ES2015) classes","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"class-autobind","version":"0.1.0","description":"Method auto-bind for ES6 (ES2015) classes","main":"lib/autobind.js","scripts":{"build":"babel src --ignore '_*' --out-dir lib","lint":"eslint --max-warnings 0 .","prepublish":"npm run build","test":"npm run lint && npm run test-src","test-src":"mocha"},"dependencies":{},"devDependencies":{"babel-core":"^6.7.2","babel-eslint":"^5.0.0","babel-plugin-transform-class-properties":"^6.6.0","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","eslint":"^2.2.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-flow-vars":"^0.2.1","eslint-plugin-react":"^4.2.1","expect":"^1.15.2","mocha":"^2.4.5"},"repository":{"type":"git","url":"git+ssh://git@github.com/sstur/class-autobind.git"},"keywords":["react","autobind","es6-class"],"author":{"name":"sstur@me.com"},"license":"ISC","bugs":{"url":"https://github.com/sstur/class-autobind/issues"},"homepage":"https://github.com/sstur/class-autobind#readme","gitHead":"26bc3e708e5f50e93c800d493f3c9875cb6235e4","_id":"class-autobind@0.1.0","_shasum":"ba70e83bbe38be64512de3770bd867e60ab4b561","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"sstur","email":"sstur@me.com"},"dist":{"shasum":"ba70e83bbe38be64512de3770bd867e60ab4b561","tarball":"https://registry.npmjs.org/class-autobind/-/class-autobind-0.1.0.tgz","integrity":"sha512-aISZWGp5R16ZbgNJ2n3LfnDvPqTSBCitOW7c6cgvpywnLEk+K5IumzkBjUjSFrDLzpYXqo6plluvUGRiIIrZvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJ9x0HanqfAqiPSO5gqZceXaSPjv9puxC4eH+nHwVfTAiEA5YJcDdxiUTaplvjOo/8eSHECVot0A/r0nPEQjea7Iog="}]},"maintainers":[{"name":"sstur","email":"sstur@me.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/class-autobind-0.1.0.tgz_1457922377584_0.872461739461869"}},"0.1.1":{"name":"class-autobind","version":"0.1.1","description":"Method auto-bind for ES6 (ES2015) classes","main":"lib/autobind.js","scripts":{"build-lib":"rimraf lib && babel src --ignore '_*' --out-dir lib","lint":"eslint --max-warnings 0 .","prepublish":"npm run build-lib","test":"npm run lint && npm run test-src","test-src":"mocha"},"dependencies":{},"devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.7.2","babel-eslint":"^5.0.0","babel-plugin-transform-class-properties":"^6.6.0","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","eslint":"2.2.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-flow-vars":"^0.2.1","eslint-plugin-react":"^4.2.1","expect":"^1.15.2","mocha":"^2.4.5","rimraf":"^2.5.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/sstur/class-autobind.git"},"keywords":["react","autobind","es6-class"],"author":{"name":"sstur@me.com"},"license":"ISC","bugs":{"url":"https://github.com/sstur/class-autobind/issues"},"homepage":"https://github.com/sstur/class-autobind#readme","gitHead":"d04ce1dcfec3b82f26a41e0c87be7a6263c493f1","_id":"class-autobind@0.1.1","_shasum":"1cd1c0f81eb79ac56a9cae6177d2c4a4d386469c","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"sstur","email":"sstur@me.com"},"dist":{"shasum":"1cd1c0f81eb79ac56a9cae6177d2c4a4d386469c","tarball":"https://registry.npmjs.org/class-autobind/-/class-autobind-0.1.1.tgz","integrity":"sha512-IEyWvTBKBwMVgqPbor1qiQWEskYuY2KYESwZ6QkQBt+e/wmLB31+T73gm+yRL7hQAqj0Y4psczP5RGrE2f3LnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXr0y/3aPpLhf1tSfLDAzodRm8cy6wU4iqjjSHWl9kHQIhAIsB5TqD95MVP17Xe8K6K8B5vv/5yvaPO11Mvmz7R9gU"}]},"maintainers":[{"name":"sstur","email":"sstur@me.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/class-autobind-0.1.1.tgz_1458541632746_0.6573245257604867"}},"0.1.2":{"name":"class-autobind","version":"0.1.2","description":"Method auto-bind for ES6 (ES2015) classes","main":"lib/autobind.js","scripts":{"build":"rimraf lib && babel src --ignore '_*' --out-dir lib","prepublish":"npm run build","lint":"eslint --max-warnings 0 .","typecheck":"flow","test-src":"mocha src/__tests__/*.js src/**/__tests__/*.js","test":"npm run lint && npm run typecheck && npm run test-src"},"dependencies":{},"devDependencies":{"babel-cli":"^6.6.5","babel-core":"^6.7.2","babel-eslint":"^5.0.0","babel-plugin-transform-class-properties":"^6.6.0","babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","eslint":"2.2.0","eslint-plugin-babel":"^3.1.0","eslint-plugin-flow-vars":"^0.2.1","eslint-plugin-react":"^4.2.1","expect":"^1.15.2","flow-bin":"^0.23.1","mocha":"^2.4.5","rimraf":"^2.5.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/kodefox/class-autobind.git"},"keywords":["react","autobind","es6-class"],"author":{"name":"team@kodefox.com"},"license":"ISC","bugs":{"url":"https://github.com/kodefox/class-autobind/issues"},"homepage":"https://github.com/kodefox/class-autobind#readme","gitHead":"dcfd6e1cd62503772f0c7b0e81aa0a6c0e098076","_id":"class-autobind@0.1.2","_shasum":"00687cf7f06850a4256e08e654f7293afe8d8d7e","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"sstur","email":"sstur@me.com"},"dist":{"shasum":"00687cf7f06850a4256e08e654f7293afe8d8d7e","tarball":"https://registry.npmjs.org/class-autobind/-/class-autobind-0.1.2.tgz","integrity":"sha512-PCeDtTkFQP2J/OM7TMwdXkhaNaVnMH4AG13JlIH6hjneq83MFeA3SWm3ly4yJ7QeaX+rvEIAASNGbDpDQ6ZH+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIed+ivhPxFgz6KRkwq//qv3/1K86TEuL9A0wq39tP6wIhAMmObe4ca+qtePHeWBgmcJaCwhIwAQr7emh2AXyNSP7m"}]},"maintainers":[{"name":"sstur","email":"sstur@me.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/class-autobind-0.1.2.tgz_1461571837190_0.9969354548957199"}},"0.1.3":{"name":"class-autobind","version":"0.1.3","description":"Method auto-bind for ES6 (ES2015) classes","main":"lib/autobind.js","scripts":{"build":"rimraf lib && babel src --ignore '_*' --out-dir lib","prepublish":"npm run build","lint":"eslint --max-warnings 0 .","typecheck":"flow","test-src":"mocha src/__tests__/*.js src/**/__tests__/*.js","test":"npm run lint && npm run typecheck && npm run test-src"},"dependencies":{},"devDependencies":{"babel-cli":"^6.9.0","babel-core":"^6.9.1","babel-eslint":"^6.0.4","babel-plugin-transform-class-properties":"^6.9.1","babel-preset-es2015":"^6.9.0","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","eslint":"^2.11.1","eslint-plugin-babel":"^3.2.0","eslint-plugin-flow-vars":"^0.4.0","eslint-plugin-react":"^5.1.1","expect":"^1.20.1","flow-bin":"^0.26.0","mocha":"^2.5.3","rimraf":"^2.5.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/kodefox/class-autobind.git"},"keywords":["react","autobind","es6-class"],"author":{"name":"team@kodefox.com"},"license":"ISC","bugs":{"url":"https://github.com/kodefox/class-autobind/issues"},"homepage":"https://github.com/kodefox/class-autobind#readme","gitHead":"98795dd279516514af1f0bd04b4e3e0a4b69f094","_id":"class-autobind@0.1.3","_shasum":"7df2b7146ba196184e7af913884e5a2afe8d20d1","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"sstur","email":"sstur@me.com"},"dist":{"shasum":"7df2b7146ba196184e7af913884e5a2afe8d20d1","tarball":"https://registry.npmjs.org/class-autobind/-/class-autobind-0.1.3.tgz","integrity":"sha512-6awyTRxMJ/8z4q5+cKGjIU/5QrcJb3IH/4+gZeUQ/LiZt/7/sr6M//4evMynh7L48pAug35AO654FwADNMD+3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCG1bu2+EZAlK0Jr0b49/qHVSwyW5sAYv4XEYc8GxypgIhAN65wFut7C94z+58AmCH+Fk7KdEmxA5scgj7GD/nlErg"}]},"maintainers":[{"name":"sstur","email":"sstur@me.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/class-autobind-0.1.3.tgz_1465379456956_0.6573862642981112"}},"0.1.4":{"name":"class-autobind","version":"0.1.4","description":"Method auto-bind for ES6 (ES2015) classes","main":"lib/autobind.js","scripts":{"build":"rimraf lib && babel src --ignore '_*' --out-dir lib","prepublish":"npm run build","lint":"eslint --max-warnings 0 .","typecheck":"flow","test-src":"mocha src/__tests__/*.js src/**/__tests__/*.js","test":"npm run lint && npm run typecheck && npm run test-src"},"dependencies":{},"devDependencies":{"babel-cli":"^6.10.1","babel-core":"^6.9.1","babel-eslint":"^6.0.4","babel-plugin-transform-class-properties":"^6.9.1","babel-preset-es2015":"^6.9.0","babel-preset-es2015-loose":"^7.0.0","babel-preset-react":"^6.5.0","babel-preset-stage-2":"^6.5.0","eslint":"^2.12.0","eslint-plugin-babel":"^3.2.0","eslint-plugin-flow-vars":"^0.4.0","eslint-plugin-react":"^5.1.1","expect":"^1.20.1","flow-bin":"^0.27.0","mocha":"^2.5.3","rimraf":"^2.5.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/kodefox/class-autobind.git"},"keywords":["react","autobind","es6-class"],"author":{"name":"team@kodefox.com"},"license":"ISC","bugs":{"url":"https://github.com/kodefox/class-autobind/issues"},"homepage":"https://github.com/kodefox/class-autobind#readme","gitHead":"eb4a71db17ee5b90d048bea0abe79c07762c9ec8","_id":"class-autobind@0.1.4","_shasum":"34516c49167cf8d3f639ddc186bcfa2268afff34","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"sstur","email":"sstur@me.com"},"dist":{"shasum":"34516c49167cf8d3f639ddc186bcfa2268afff34","tarball":"https://registry.npmjs.org/class-autobind/-/class-autobind-0.1.4.tgz","integrity":"sha512-Hd4wk0aVnIiMKCI/qA006/U+yOlbLV0BVAeaQqh9NyQZMPWfIOJh5fPZqN3T9Y9UydYdfIa27Hxp+dPh7jYT3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAEPin3bTOV2tynINZ32YMD3/wYYFoI7L1z2OsXVHu/AiAJNzGsxx0CEjuY01o3bYFvFHiJe0uHWFoeuUbOkxBPcw=="}]},"maintainers":[{"name":"sstur","email":"sstur@me.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/class-autobind-0.1.4.tgz_1465820551063_0.6523885580245405"}}},"readme":"# Method auto-bind for ES6 (ES2015) classes\n\nThis package provides a single function, `autobind`, for use within a constructor to bind all methods to the instance itself.\n\nFor example, this allows us to pass a method to an event handler `element.addEventListener('click', this.onClick)` and be sure the `onClick` method will always be called with the right context.\n\nNote: This has some specific logic for React, but could be used in any project.\n\n## Usage:\n\n```js\nimport autobind from 'class-autobind';\n\nclass MyComponent extends React.Component {\n  constructor() {\n    super(...arguments);\n    autobind(this);\n  }\n  render() {\n    return <button onClick={this.onClick}>Click Me</button>;\n  }\n  onClick() {\n    console.log('Button Clicked');\n  }\n}\n```\n\n## Advanced Usage:\n\nIf your component will possibly be subclassed (you really should not do this, but some third-party libraries like [react-css-modules](https://npmjs.com/package/react-css-modules) do so) then you will need to specify which prototype will be the source of methods that are to be automatically bound.\n\n```js\nimport autobind from 'class-autobind';\n\nclass MyComponent extends React.Component {\n  constructor() {\n    super(...arguments);\n    autobind(this, MyComponent.prototype); // Note the second parameter.\n  }\n  render() {\n    /* ... */\n  }\n}\n\nclass MySubClassedComponent extends MyComponent {\n  /* This is probably a very bad idea. */\n}\n```\n\n## License\n\nThis software is [BSD Licensed](/LICENSE).\n","maintainers":[{"name":"sstur","email":"sstur@me.com"}],"time":{"modified":"2022-06-13T06:05:34.595Z","created":"2016-03-14T02:26:18.050Z","0.1.0":"2016-03-14T02:26:18.050Z","0.1.1":"2016-03-21T06:27:13.198Z","0.1.2":"2016-04-25T08:10:40.498Z","0.1.3":"2016-06-08T09:50:59.992Z","0.1.4":"2016-06-13T12:22:31.670Z"},"homepage":"https://github.com/kodefox/class-autobind#readme","keywords":["react","autobind","es6-class"],"repository":{"type":"git","url":"git+ssh://git@github.com/kodefox/class-autobind.git"},"author":{"name":"team@kodefox.com"},"bugs":{"url":"https://github.com/kodefox/class-autobind/issues"},"license":"ISC","readmeFilename":"README.md","users":{"wsmd":true}}