From 583aa3f91c17f10a9015ce50cf570ac413905f4c Mon Sep 17 00:00:00 2001 From: GingerPlusPlus Date: Thu, 26 Apr 2018 22:29:58 +0200 Subject: [PATCH] Make tests pass --- package.json | 7 +++++-- src/io.js | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4b9e99d..0cd2501 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,10 @@ "version": "0.0.1", "description": "IO control structure.", "main": "fantasy-io.js", - "files": ["fantasy-io.js", "src/*.js"], + "files": [ + "fantasy-io.js", + "src/*.js" + ], "repository": { "type": "git", "url": "git://github.com/puffnfresh/fantasy-io.git" @@ -31,6 +34,6 @@ "fantasy-identities": "git+https://github.com/fantasyland/fantasy-identities.git" }, "scripts": { - "test": "node --harmony_destructuring node_modules/.bin/nodeunit test/*.js" + "test": "nodeunit test/io.js" } } diff --git a/src/io.js b/src/io.js index 3e94df5..f5f9b75 100644 --- a/src/io.js +++ b/src/io.js @@ -22,4 +22,9 @@ IO.prototype[ap] = function(a) { return this[chain]((f) => a[map](f)); }; -module.exports = IO; \ No newline at end of file +IO.of = IO[of]; +IO.prototype.chain = IO.prototype[chain]; +IO.prototype.map = IO.prototype[map]; +IO.prototype.ap = IO.prototype[ap]; + +module.exports = IO;