monet/monet.js

Use in node?

manndave opened this issue · 5 comments

Investigating Monet for use in node and getting an error ReferenceError: List is not defined from node_modules\monet\dist\monet-pimp.js:41 when I add require('monet/dist/monet-pimp'); into my project (after require('monet');).

I'm trying to convert an array of objects to a List like this: const myList = arr.list(); which requires monet-pimp, no?

Any ideas?

Thx.

@manndave which version do you use?

@manndave I found what is the problem - pimp now works in browser only. I will add support for node, but be aware that it'll eventually be moved out to separate library (or even dropped…)

…and probably the only way - List.fromArray(arr)

see https://github.com/monet/monet.js/blob/develop/docs/LIST.md#constructors