custom-ability
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -14,7 +14,8 @@ (function() { | ||
module.exports = function(AbilityClass, aCoreMethod, isGetClassFunc) { | ||
module.exports = function(abilityClass, aCoreMethod, isGetClassFunc) { | ||
return function(aClass, aOptions) { | ||
var filter, vExcludes, vIncludes; | ||
var AbilityClass, filter, vExcludes, vIncludes; | ||
AbilityClass = abilityClass; | ||
if (isGetClassFunc === true) { | ||
AbilityClass = AbilityClass(aClass, aOptions); | ||
AbilityClass = abilityClass(aClass, aOptions); | ||
} | ||
@@ -21,0 +22,0 @@ if (aClass == null) { |
{ | ||
"name": "custom-ability", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "make custom ability more easy. generate the ability which can be added to any class directly.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/snowyu/custom-ability.js", |
@@ -15,9 +15,11 @@ ### custom-ability [![Build Status](https://img.shields.io/travis/snowyu/custom-ability.js/master.png)](http://travis-ci.org/snowyu/custom-ability.js) [![npm](https://img.shields.io/npm/v/custom-ability.svg)](https://npmjs.org/package/custom-ability) [![downloads](https://img.shields.io/npm/dm/custom-ability.svg)](https://npmjs.org/package/custom-ability) [![license](https://img.shields.io/npm/l/custom-ability.svg)](https://npmjs.org/package/custom-ability) | ||
* customAbility(AbilityClass, coreMethod) | ||
* customAbility(abilityClass, coreMethod[, isGetClassFunction]) | ||
__arguments__ | ||
* AbilityClass *(function)*: make the class become to ability. | ||
* abilityClass *(function)*: the class will become to ability able. | ||
* coreMethod *(string)*: the core instance method name to identify this ability. | ||
* it's the key to avoid duplication injection. | ||
* isGetClassFunction *(boolean)*: the `AbilityClass` is a `function(aClass, aOptions)` | ||
to return the real `Ability Class` if true. defaults to false. | ||
@@ -24,0 +26,0 @@ __return__ |
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
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
17588
74
116