autobind-decorator
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -1,6 +0,1 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
/** | ||
@@ -20,2 +15,7 @@ * @copyright 2015, Andrey Popp <8mayday@gmail.com> | ||
*/ | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
exports['default'] = autobind; | ||
@@ -42,3 +42,3 @@ | ||
// Use Reflect if exists | ||
if (typeof Reflect !== 'undefined') { | ||
if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') { | ||
keys = Reflect.ownKeys(target.prototype); | ||
@@ -84,3 +84,3 @@ } else { | ||
get: function get() { | ||
if (this === target.prototype) { | ||
if (this === target.prototype || this.hasOwnProperty(key)) { | ||
return fn; | ||
@@ -87,0 +87,0 @@ } |
{ | ||
"name": "autobind-decorator", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Decorator for binding method to an object", | ||
@@ -13,6 +13,6 @@ "main": "lib/index.js", | ||
"babel": "^5.0.12", | ||
"babel-eslint": "^3.1.0", | ||
"babel-eslint": "^4.0.0", | ||
"babelify": "^6.0.2", | ||
"core-js": "^0.9.6", | ||
"eslint": "^0.20.0", | ||
"eslint": "^1.0.0", | ||
"mocha": "^2.2.4", | ||
@@ -19,0 +19,0 @@ "mochify": "^2.7.1", |
@@ -17,5 +17,11 @@ # autobind decorator | ||
As decorators are a part of future ES7 standard they can only be used with | ||
As decorators are a part of future ES2016 standard they can only be used with | ||
transpilers such as [Babel](http://babeljs.io). | ||
**Note Babel 6 users:** | ||
The implementation of the decorator transform is currently on hold as the syntax | ||
is not final. If you would like to use this project with Babel 6.0, you may use | ||
[babel-plugin-transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy) | ||
which implement Babel 5 decorator transform for Babel 6. | ||
Installation: | ||
@@ -22,0 +28,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17512
55