javascript - Underscore.js _.partial with _ as argument not working -


I am using backcon and underscore. According to the document of Underscore.js, you can pass _ _ in your list of logic for a logic of _ partial (function, * args) function:

To specify that should not be filled with the first, but left to the call-time supply to the open.

Anyone have a working example of this? I am making a partial call within such a scene:

  this.filterCollection = _.partial (filterFn, _, SEARCHTERM);  

Where FilterFn looks like this:

  function (license, key) {var organization; Organization = app.organizations.get (license.get ('organization_id')); If (license.isNew ()) {return true; // Always include new models in search} Other {Return (Organization & amp; Organization .get ('name'). Index (key)! == -1); }}  

I am calling this in keeping with this in mind:

  this.filterCollection (model)  

The filter crashes on the phone line: organization = app.organizations.get (license.get ('organization_id')); Because License has no way to get .

obj ; If (! (_name of this example)) returned the new _ (obj); This._wrapped = obj; } itemprop = "text">

It seems they just added the option to use _

version 1.6.0, it is no wonder that I could not find much documentation about it. :)


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -