Comparing version 0.0.10 to 0.0.11
@@ -0,1 +1,18 @@ | ||
var toArray = function (arguments) { | ||
return Array.prototype.slice.call(arguments, 0); | ||
}; | ||
var methodFunction = function (name) { | ||
return function (obj) { | ||
var args = toArray(arguments).slice(1); | ||
return obj[name].apply(obj, args); | ||
}; | ||
}; | ||
var propFunction = function (name) { | ||
return function (obj) { | ||
return obj[name]; | ||
}; | ||
}; | ||
var globalFnMap = { | ||
@@ -5,3 +22,24 @@ abs: Math.abs, | ||
min: Math.min, | ||
round: Math.round, | ||
pow: Math.pow, | ||
sqrt: Math.sqrt, | ||
slice: methodFunction('slice'), | ||
concat: methodFunction('concat'), | ||
indexOf: methodFunction('indexOf'), | ||
lastIndexOf: methodFunction('lastIndexOf'), | ||
replace: methodFunction('replace'), | ||
split: methodFunction('split'), | ||
substr: methodFunction('substr'), | ||
substring: methodFunction('substring'), | ||
toLowerCase: methodFunction('toLowerCase'), | ||
toUpperCase: methodFunction('toUpperCase'), | ||
trim: methodFunction('trim'), | ||
trimLeft: methodFunction('trimLeft'), | ||
trimRight: methodFunction('trimRight'), | ||
join: methodFunction('join'), | ||
reverse: methodFunction('reverse'), | ||
length: propFunction('length'), | ||
sum: function () { | ||
@@ -8,0 +46,0 @@ var sum = 0; |
{ | ||
"name": "funql", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "FUNctional Query Language", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83053
2485