🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

custom-ability

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-ability - npm Package Compare versions

Comparing version

to
1.1.1

7

lib/custom-ability.js

@@ -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