externalise
Turn member functions into functions accepting object as an argument.
For example:
var externalise = ;var length = ; ;// #=> 3
This is particularly useful when used in conjunction with higher-order functions like map
from lodash
.
var _ = ; _;// #=> [5, 6]
Also provided is externalise.proto
, which externalises all functions on an object's prototype.
{ thisvalue = x;}; Identityprototype { return thisvalue;}; Identityprototype { thisvalue = value; return this;}; var externals = externalise; externals;// #=> 10 externals;// #=> { value: 100 };
Lastly, feel free to rename your import externalize
if the spelling is wrong in your region. :)