methmeth
Call a method on an object in an Array.prototype callback.
$ npm install --save methmeth
var meth = ; var friends = name: 'passy' hobby: 'carrots' { return thisname + ' likes ' + thishobby; } name: 'sindre' vehicle: 'unicorn taxi' { return thisname + ' drives a ' + thisvehicle; } name: 'addy' invented: 'google *' { return thisname + ' created ' + thisinvented; } ;
Before
var myFriends = friends;// passy likes carrots// sindre drives a unicorn taxi// addy created google *
After
friends;// passy likes carrots// sindre drives a unicorn taxi// addy created google *
Pre-fill arguments
var friends = name: 'dave' passion: 'dried mango' { return thisname + ' loves ' + thispassion + emotion; } ; friends;// dave loves dried mango!!!!
Related
- propprop - Pluck a property out of an object in an Array.prototype callback.