Use in node?
manndave opened this issue · 5 comments
manndave commented
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.
ulfryk commented
@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…)
Deleted user commented
Ok. Whats the best way to convert an existing array to a list, then?
…-------- Original message --------
From: Jakub Strojewski <notifications@github.com>
Date: 4/19/18 2:10 AM (GMT-05:00)
To: "monet/monet.js" <monet.js@noreply.github.com>
Cc: David Mann <dave@mannsoftware.com>, Mention <mention@noreply.github.com>
Subject: Re: [monet/monet.js] Use in node? (#166)
@manndave<https://github.com/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…)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#166 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGiTa6ZZIlvB8zIAZOGWD12yo_6_tVxvks5tqCpvgaJpZM4Ta9CO>.
ulfryk commented
…and probably the only way - List.fromArray(arr)
see https://github.com/monet/monet.js/blob/develop/docs/LIST.md#constructors
Deleted user commented
Thx.