using import and that worked but wondered if there...
# suitescript
j
using import and that worked but wondered if there's a NetSuite preferred way
c
So far I've been able to import files into NS scripts using the define, but keep in mind netsuite is ES 5.1
j
Yeah I know it's 5.1, but SS 2.1 I've heard reports supports features up to ES 10. Worst case I'll just do what I've done. It's a utility class that really has nothing to do with NetSuite objects and will always be run client side. Naturally I want a SuiteScript file to call methods on this class, so for now in my script module I'll just put the class on the window object.
c
I wouldn't go with 2.1 yet, since it's still on beta and like you say, they could support some modules from ES10 but for now I'd try to make it safer, if it's a utility class you can later upgrade it to use certain functionalities.. I'm still outrageous about using indexOf to search in arrays
j
Thanks Carlos
s
I can't think of any reason not to use it if it's a client side script.