Hello, is it possible to use an npm module in Suit...
# suitescript
a
Hello, is it possible to use an npm module in Suitescript?
s
sure, I look to use prewritten libraries (npm modules) whenever possible in order to improve solution quality.
a
Yes, libraries are great. I was under the impression that I can only use a plain .js file as a library and I wasn't sure if I can use get an npm module as a js file?
b
Most npm modules are js
Your primary problem will be that most modules are written for use in browsers or node
Code that uses browser globals or node core modules tends to fail in suitescript since neither of those two things exist
a
Got it, thank you so much!
b
As an example, there is a pdf npm module recommendation in a thread from about 12 hours ago
Its unlikely to work in suitescript since it requires the node fs module