Skip to content

Commit

Permalink
feat(util): add method to make dynamic scopes name
Browse files Browse the repository at this point in the history
dynamic scopes are like macros to query builder
  • Loading branch information
thetutlage committed Feb 27, 2016
1 parent 6e12a50 commit 654cbb1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,20 @@ util.makeSetterName = function (name) {
return `set${i.camelize(i.underscore(name))}`
}

/**
* makes a dynamic scope method for a given name
*
* @method makeScopeMethodName
*
* @param {String} name
* @return {String}
*
* @public
*/
util.makeScopeMethodName = function (name) {
return `scope${i.camelize(name)}`
}

/**
* map values for a given key and returns
* the transformed array with that key only
Expand Down

0 comments on commit 654cbb1

Please sign in to comment.