ExploreConsulting / netsuite-fasttrack-toolkit-ss2

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

Add size to LazySearch #18

Closed johnogle222 closed 5 years ago

johnogle222 commented 5 years ago

The intent here is to be able to do the following:

const results = Seq(LazySearch(mySearch))
var totalResultCount = results.size()
johnogle222 commented 5 years ago

I realize now this isn't working as intended. Let me read some docs and go back to the drawing board :)

johnogle222 commented 5 years ago

I ended up converting this to a List and then calling size like so:

const results = Seq(LazySearch.from(search.create(...)))
  .takeWhile(governanceRemains(new Date().getTime(), 0.1))
  .map(...)
  .toList()
const totalResultCount = results.size