js-evaluator-for-android icon indicating copy to clipboard operation
js-evaluator-for-android copied to clipboard

Can I incorporate an npm package using js-evaluator?

Open Yuhanlolo opened this issue 3 years ago • 3 comments

Can I incorporate an npm package using js-evaluator? If yes, how should I do that?

Yuhanlolo avatar May 18 '21 02:05 Yuhanlolo

Hi @Yuhanlolo, you will need to manually download the package, load its JavaScript code into a string variable. Then you can evaluate this code with this library.

evgenyneu avatar May 18 '21 04:05 evgenyneu

@evgenyneu Thanks! Does that mean I should pack all the js code into a single string, as most of the npm packages have multiple files and functions, should I manually put them all together?

Yuhanlolo avatar May 18 '21 14:05 Yuhanlolo

Yes

evgenyneu avatar May 18 '21 22:05 evgenyneu