Comparing version 0.1.4 to 0.1.5
@@ -12,3 +12,3 @@ { | ||
"description": "A practical functional library for Javascript programmers.", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"homepage": "https://www.github.com/CrossEye/ramda", | ||
@@ -24,3 +24,24 @@ "license": "MIT", | ||
}, | ||
"dependencies": {} | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-cli": "~0.1.7", | ||
"grunt-mocha": "~0.3.4", | ||
"grunt-docco": "latest", | ||
"grunt-contrib-jshint": "~0.7.0", | ||
"grunt-contrib-uglify": "~0.2.2", | ||
"grunt-mocha-test": "~0.5.0", | ||
"grunt-istanbul": "~0.2.4" | ||
}, | ||
"extraDevDependencies -- if we want to use Gulp": { | ||
"gulp-rename": "~0.2.1", | ||
"gulp-jshint": "~1.3.2", | ||
"gulp-uglify": "~0.1.0", | ||
"gulp-mocha": "~0.1.0", | ||
"gulp-clean": "~0.1.2", | ||
"gulp-util": "~2.2.0", | ||
"gulp-header": "godaddy/gulp-header", | ||
"gulp-istanbul": "~0.1.0", | ||
"moment": "~2.5.0" | ||
} | ||
} |
27
ramda.js
@@ -94,9 +94,14 @@ // ramda.js 0.0.1 | ||
var nAry = R.nAry = (function() { | ||
var cache = {}; | ||
var cache = { | ||
0: function(func) {return function() {return func.call(this);};}, | ||
1: function(func) {return function(arg0) {return func.call(this, arg0);};}, | ||
2: function(func) {return function(arg0, arg1) {return func.call(this, arg0, arg1);};}, | ||
3: function(func) {return function(arg0, arg1, arg2) {return func.call(this, arg0, arg1, arg2);};} | ||
}; | ||
// For example: | ||
// cache[3] = function(func) { | ||
// return function(arg0, arg1, arg2) { | ||
// return func.call(this, arg0, arg1, arg2); | ||
// cache[5] = function(func) { | ||
// return function(arg0, arg1, arg2, arg3, arg4) { | ||
// return func.call(this, arg0, arg1, arg2, arg3, arg4); | ||
// } | ||
@@ -124,7 +129,12 @@ // }; | ||
var arity = R.arity = (function() { | ||
var cache = {}; | ||
var cache = { | ||
0: function(func) {return function() {return func.apply(this, arguments);};}, | ||
1: function(func) {return function(arg0) {return func.apply(this, arguments);};}, | ||
2: function(func) {return function(arg0, arg1) {return func.apply(this, arguments);};}, | ||
3: function(func) {return function(arg0, arg1, arg2) {return func.apply(this, arguments);};} | ||
}; | ||
// For example: | ||
// cache[3] = function(func) { | ||
// return function(arg0, arg1, arg2) { | ||
// cache[5] = function(func) { | ||
// return function(arg0, arg1, arg2, arg3, arg4) { | ||
// return func.apply(this, arguments); | ||
@@ -618,2 +628,3 @@ // } | ||
// Returns a new list containing the first `n` elements of the given list. | ||
// if `n > list.length`, take will return a list if `list.length` elements. | ||
var take = R.take = _(function(n, list) { | ||
@@ -624,3 +635,3 @@ if (hasMethod('take', list)) { | ||
var ls = clone(list); | ||
ls.length = n; | ||
ls.length = Math.min(n, list.length); | ||
return ls; | ||
@@ -627,0 +638,0 @@ }); |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
921170
62
21087
8
7
2