ramda-fantasy
Advanced tools
Comparing version 0.5.0 to 0.6.0
{ | ||
"name": "ramda-fantasy", | ||
"description": "Fantasy Land compatible types for easy integration with Ramda", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"authors": [ | ||
@@ -32,3 +32,3 @@ { | ||
"dependencies": { | ||
"ramda": "^0.14.0" | ||
"ramda": ">=0.15.0 <=0.21.x" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
@@ -104,3 +104,3 @@ # Either | ||
contained in the provided `Right`, producing a `Right` containing the result. If | ||
the instance is `Left`, the result will be the the `Left` instance. If the | ||
the instance is `Left`, the result will be the `Left` instance. If the | ||
instance is `Right` and the provided either is `Left`, the result will be the | ||
@@ -107,0 +107,0 @@ provided `Left`. |
@@ -16,3 +16,3 @@ { | ||
"description": "Fantasy Land compatible types for easy integration with Ramda", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"homepage": "https://www.github.com/ramda/ramda-fantasy", | ||
@@ -34,3 +34,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"ramda": ">=0.15.0 <0.20.0" | ||
"ramda": ">=0.15.0 <=0.21.x" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
@@ -19,2 +19,4 @@ var R = require('ramda'); | ||
Either.prototype['@@type'] = 'ramda-fantasy/Either'; | ||
Either.prototype.map = util.returnThis; | ||
@@ -21,0 +23,0 @@ |
@@ -21,2 +21,4 @@ var R = require('ramda'); | ||
Future.prototype['@@type'] = 'ramda-fantasy/Future'; | ||
Future.prototype.fork = function(reject, resolve) { | ||
@@ -23,0 +25,0 @@ this._fork(reject, jail(reject, resolve)); |
@@ -23,2 +23,4 @@ var R = require('ramda'); | ||
Identity.prototype['@@type'] = 'ramda-fantasy/Identity'; | ||
/** | ||
@@ -25,0 +27,0 @@ * Applicative specification. Creates a new `Identity[a]` holding the value `a`. |
@@ -14,2 +14,4 @@ var R = require('ramda'); | ||
IO.prototype['@@type'] = 'ramda-fantasy/IO'; | ||
// `f` must return an IO | ||
@@ -16,0 +18,0 @@ IO.prototype.chain = function(f) { |
@@ -9,2 +9,4 @@ var R = require('ramda'); | ||
Maybe.prototype['@@type'] = 'ramda-fantasy/Maybe'; | ||
function Just(x) { | ||
@@ -11,0 +13,0 @@ this.value = x; |
@@ -15,2 +15,4 @@ var R = require('ramda'); | ||
Reader.prototype['@@type'] = 'ramda-fantasy/Reader'; | ||
Reader.prototype.chain = function(f) { | ||
@@ -17,0 +19,0 @@ var reader = this; |
@@ -39,2 +39,4 @@ var R = require('ramda'); | ||
_Tuple.prototype['@@type'] = 'ramda-fantasy/Tuple'; | ||
// semigroup | ||
@@ -41,0 +43,0 @@ _Tuple.prototype.concat = function(x) { |
@@ -113,2 +113,11 @@ var R = require('ramda'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Either"', function() { | ||
assert.strictEqual(Either.Left(null)['@@type'], 'ramda-fantasy/Either'); | ||
assert.strictEqual(Either.Right(null)['@@type'], 'ramda-fantasy/Either'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -115,0 +124,0 @@ |
@@ -194,2 +194,13 @@ var R = require('ramda'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Future"', function() { | ||
assert.strictEqual( | ||
Future(function(reject, resolve) { void resolve; })['@@type'], | ||
'ramda-fantasy/Future' | ||
); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -196,0 +207,0 @@ |
@@ -65,2 +65,10 @@ var assert = require('assert'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Identity"', function() { | ||
assert.strictEqual(Identity(null)['@@type'], 'ramda-fantasy/Identity'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -67,0 +75,0 @@ |
@@ -93,2 +93,10 @@ var assert = require('assert'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/IO"', function() { | ||
assert.strictEqual(IO(function() {})['@@type'], 'ramda-fantasy/IO'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -95,0 +103,0 @@ |
@@ -132,2 +132,11 @@ var R = require('ramda'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Maybe"', function() { | ||
assert.strictEqual(Maybe.Just(null)['@@type'], 'ramda-fantasy/Maybe'); | ||
assert.strictEqual(Maybe.Nothing()['@@type'], 'ramda-fantasy/Maybe'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -134,0 +143,0 @@ |
@@ -94,2 +94,11 @@ var assert = require('assert'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Reader"', function() { | ||
assert.strictEqual(Reader(function(x) { void x; })['@@type'], | ||
'ramda-fantasy/Reader'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -96,0 +105,0 @@ |
@@ -160,2 +160,10 @@ var R = require('ramda'); | ||
describe('#@@type', function() { | ||
it('is "ramda-fantasy/Tuple"', function() { | ||
assert.strictEqual(Tuple(null, null)['@@type'], 'ramda-fantasy/Tuple'); | ||
}); | ||
}); | ||
describe('#toString', function() { | ||
@@ -162,0 +170,0 @@ |
92310
1879
+ Addedramda@0.21.0(transitive)
- Removedramda@0.19.1(transitive)
Updatedramda@>=0.15.0 <=0.21.x