MCPcopy Index your code
hub / github.com/omkarcloud/botasaurus / getItemRepr

Function getItemRepr

js/botasaurus-js/src/task.ts:241–253  ·  view source on GitHub ↗
(item: any)

Source from the content-addressed store, hash-verified

239}
240
241export function getItemRepr(item: any): string | number {
242 if (Array.isArray(item)) {
243 return JSON.stringify(item)
244 } else if (item instanceof Set) {
245 return JSON.stringify(Array.from(item))
246 } else if (typeof item === 'number' || typeof item === 'string') {
247 return item
248 } else if (item && typeof item === 'object' && !Array.isArray(item)) {
249 return JSON.stringify(item)
250 } else {
251 return JSON.stringify(item)
252 }
253}
254
255export const __SKIP__ = Symbol('__SKIP__')
256

Callers 2

getUniqueItemsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected