Comparing version 1.0.0-alpha-18 to 1.0.0-alpha-19
@@ -10,13 +10,3 @@ // Generated by CoffeeScript 1.9.1 | ||
describe("Logical functions", function(context) { | ||
var f_and, f_eq, f_neq, f_or, negate; | ||
f_and = curry(function(f, g) { | ||
return function() { | ||
return (f.apply(null, arguments)) && (g.apply(null, arguments)); | ||
}; | ||
}); | ||
f_or = curry(function(f, g) { | ||
return function() { | ||
return (f.apply(null, arguments)) || (g.apply(null, arguments)); | ||
}; | ||
}); | ||
var both, different, either, negate, neither, same; | ||
negate = function(f) { | ||
@@ -32,8 +22,19 @@ return function() { | ||
}); | ||
f_eq = curry(function(f, g) { | ||
both = curry(function(f, g) { | ||
return function() { | ||
return (f.apply(null, arguments)) && (g.apply(null, arguments)); | ||
}; | ||
}); | ||
either = curry(function(f, g) { | ||
return function() { | ||
return (f.apply(null, arguments)) || (g.apply(null, arguments)); | ||
}; | ||
}); | ||
neither = negate(either); | ||
same = curry(function(f, g) { | ||
return function() { | ||
return (f.apply(null, arguments)) === (g.apply(null, arguments)); | ||
}; | ||
}); | ||
f_neq = curry(function(x, y) { | ||
different = curry(function(x, y) { | ||
return function() { | ||
@@ -44,7 +45,8 @@ return (f.apply(null, arguments)) !== (g.apply(null, arguments)); | ||
return module.exports = { | ||
f_and: f_and, | ||
f_or: f_or, | ||
negate: negate, | ||
f_eq: f_eq, | ||
f_neq: f_neq | ||
both: both, | ||
either: either, | ||
neither: neither, | ||
same: same, | ||
different: different | ||
}; | ||
@@ -51,0 +53,0 @@ }); |
@@ -14,3 +14,3 @@ // Generated by CoffeeScript 1.9.1 | ||
describe("Object functions", function(context) { | ||
var bind, clone, delegate, detach, extend, has, include, is_object, keys, merge, negate, omit, pairs, pick, properties, property, query, values; | ||
var bind, clone, delegate, detach, extend, from_json, has, include, is_object, keys, merge, negate, omit, pairs, pick, properties, property, query, to_json, values; | ||
include = extend = function() { | ||
@@ -303,2 +303,13 @@ var i, key, len, mixin, mixins, object, value; | ||
}); | ||
to_json = function(x, pretty) { | ||
if (pretty == null) { | ||
pretty = false; | ||
} | ||
if (pretty) { | ||
return JSON.stringify(x, null, 2); | ||
} else { | ||
return JSON.stringify(x); | ||
} | ||
}; | ||
from_json = JSON.parse; | ||
return module.exports = { | ||
@@ -320,3 +331,5 @@ include: include, | ||
omit: omit, | ||
query: query | ||
query: query, | ||
to_json: to_json, | ||
from_json: from_json | ||
}; | ||
@@ -323,0 +336,0 @@ }); |
{ | ||
"name": "fairmont", | ||
"version": "1.0.0-alpha-18", | ||
"version": "1.0.0-alpha-19", | ||
"description": "A collection of useful functions and utilities.", | ||
@@ -12,7 +12,7 @@ "files": [ | ||
"scripts": { | ||
"prepublish": "coffee -o lib/ -c src/*.*coffee", | ||
"prepublish": "coffee --nodejs --harmony -o lib/ -c src/*.*coffee", | ||
"test": "coffee --nodejs --harmony test/test.litcoffee", | ||
"watch": "coffee --nodejs --harmony -o lib/ -cw src/*.*coffee", | ||
"tag": "(node_modules/.bin/json -f package.json version | xargs -I version git tag -am version version) && git push --tags" | ||
}, | ||
"tag": "(node_modules/.bin/json -f package.json version | tee VERSION | xargs -I version git tag -am version version) && git push --tags" | ||
}, | ||
"repository": { | ||
@@ -31,5 +31,6 @@ "type": "git", | ||
], | ||
"license": "MIT", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"amen": "^1.0.0-alpha-03" | ||
"amen": "^1.0.0-alpha-03", | ||
"json": "^9.0.3" | ||
}, | ||
@@ -36,0 +37,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
108152
29
2027
2