Comments (8)
+1 :)
from monet.js.
Would you be able to show me how to do that?—
Sent from Mailbox
On Fri, Aug 1, 2014 at 3:17 PM, Erwin Poeze [email protected]
wrote:
It would be convenient if monet.js was available in npm too.
Reply to this email directly or view it on GitHub:
https://github.com/cwmyers/monet.js/issues/12
from monet.js.
I've done some modifications to make it work. The wrapper in monet.js needs to be adapted for node's require and some info must be added to the package.json.
A few points to consider.
One calls monet from node like:
var m = require('monet'); // (dropped the .js btw as is recommended)
var someString = m.Maybe.Some('abcd');
The curry function is a separate function attached to window
and it will be a separate node module too. In node there is not something as a global space where you can attached functions to. It might be a better idea to add curry to the monet
module.
The tests are created for the browser using jasmine. I'm not familiar with jasmine, maybe it can be made fit for node as well.
If you want to test packaging a node module locally take a look at this article
I'll send a PR with some mods I've made
from monet.js.
You are brilliant. Thanks so much.
Can I ask, are you using monet in any projects? What parts of monet do you use the most?
—
Sent from Mailbox
On Sat, Aug 2, 2014 at 7:13 PM, Erwin Poeze [email protected]
wrote:
I've done some modifications to make it work. The wrapper in monet.js needs to be adapted for node's require and some info must be added to the package.json.
A few points to consider.
One calls monet from node like:var m = require('monet'); // (dropped the .js btw as is recommended) var someString = m.Maybe.Some('abcd');
The curry function is a separate function attached to
window
and it will be a separate node module too. In node there is not something as a global space where you can attached functions to. It might be a better idea to add curry to themonet
module.
The tests are created for the browser using jasmine. I'm not familiar with jasmine, maybe it can be made fit for node as well.
If you want to test packaging a node module locally take a look at this articleI'll send a PR with some mods I've made
Reply to this email directly or view it on GitHub:
https://github.com/cwmyers/monet.js/issues/12#issuecomment-50958236
from monet.js.
Well, to be honest, I'm not using it in projects. I'm trying to program in a functional way in javascript as much as I can and stumbled across your library. At the moment I'm trying to sort out how to apply monads in a useful way. Obviously you do not need them in js, but as far as I can tell, using them could improve my projects.
from monet.js.
Are there any proceedings on this one, @donnut?
We want to use monet.js in production with webpack and it would be great if it was packaged properly.
Update:
I should have read the root of the project, it has package.json and
"monet": "git://github.com/cwmyers/monet.js.git#master"
in our package.json did the trick, I'll test if [some-]things work and will provide feedback here.
from monet.js.
Installation with npm works perfectly for our team, everything works, this issue should be closed :)
from monet.js.
Hi,
I'm a bit rookie with npm, I was able to install (and require) monet
with npm, but while a require("monet");
works, a require("monet-pimp");
after doesn't.
Am I missing something?
from monet.js.
Related Issues (20)
- Either from exception HOT 7
- Maybe.fromEmpty? HOT 3
- Maybe.None() === Maybe.None() => false HOT 2
- Shortcut for flatMap on possibly falsy data (flatMapFromFalsy) HOT 1
- *.isInstance returns "truthy" value for every monad HOT 1
- `Either.fromPromise` HOT 6
- Rollup error - "is not exported by..." HOT 1
- Maybe.fromEmpty is not yet added to src/monet.d.ts HOT 12
- List.nth or similar HOT 3
- Applicative.apOn(value: Applicative<V>) proposal. HOT 2
- Maybe.filter should work as type guard HOT 10
- Do notation implementation
- How to supply a `Semigroup appender` to `sequenceValidation`?
- Error on "List -> find" with single value of null HOT 3
- sequenceValidation doesn't work for Fail as stated in docs
- [request for help] - casting right type on left HOT 1
- Missing type guard argument on fromFalsy
- Is it wrong to call "run()" two times in a row?
- Type 'V' does not satisfy the constraint '{}' HOT 7
- Exception is thrown if the object is without constructor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monet.js.