autobind-decorator
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -39,3 +39,15 @@ 'use strict'; | ||
// (Using reflect to get all keys including symbols) | ||
Reflect.ownKeys(target.prototype).forEach(function (key) { | ||
var keys = undefined; | ||
// Use Reflect if exists | ||
if (typeof Reflect !== 'undefined') { | ||
keys = Reflect.ownKeys(target.prototype); | ||
} else { | ||
keys = Object.getOwnPropertyNames(target.prototype); | ||
// use symbols if support is provided | ||
if (typeof Object.getOwnPropertySymbols === 'function') { | ||
keys = keys.concat(Object.getOwnPropertySymbols(target.prototype)); | ||
} | ||
} | ||
keys.forEach(function (key) { | ||
// Ignore special case target method | ||
@@ -42,0 +54,0 @@ if (key === 'constructor') { |
{ | ||
"name": "autobind-decorator", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Decorator for binding method to an object", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16900
82