ExploreConsulting / netsuite-fasttrack-toolkit-ss2

NFT for SuiteScript 2.X
74 stars 20 forks source link

Add LazySearch #2

Closed ShawnTalbert closed 6 years ago

ShawnTalbert commented 7 years ago

Bring LazySearch like it is in NFT-SS1.

ShawnTalbert commented 7 years ago

I'm thinking the 'lazy' aspect of lazysearch from SS1 is really handled by the MapReduce script in SS2. Also, it seems the lazy evaluation feature isn't used all that often in SS1. Users usually materialize all the results into a memory resident array.

For these reasons I suggest we consider, in detail, what functionality we want for SS2 development. A couple suggestions:

ShawnTalbert commented 6 years ago

b84dd052e5c94a864b59a527eff22197ef9d0fbb added nsSearchResult2obj() what next?

ShawnTalbert commented 6 years ago

Consider leveraging https://www.npmjs.com/package/sequency for lazysearch with a goal to provide the same simple .takeWhile(governanceRemains) type operation for SS2.

Looks like Sequency works, but not out of the box - their UMD build didn't work, nor did a directed AMD build - had to tweak the module system code by hand to get it to work in NS.

ShawnTalbert commented 6 years ago

ended up going with immutablejs. Basic support is in NFT 2.2.1