Sha256: 990a9f441038fd753f68f082453cf0beba192cc4959aae33545780c6128a81a1

Contents?: true

Size: 1.18 KB

Versions: 26

Compression:

Stored size: 1.18 KB

Contents

{"version":3,"sources":["../../../../src/core/utils/internal/isIterable.ts"],"sourcesContent":["/**\n * This is the same as TypeScript's `Iterable`, but with all three type parameters.\n * @todo Remove once TypeScript 5.6 is the minimum.\n */\nexport interface Iterable<T, TReturn, TNext> {\n  [Symbol.iterator](): Iterator<T, TReturn, TNext>\n}\n\n/**\n * This is the same as TypeScript's `AsyncIterable`, but with all three type parameters.\n * @todo Remove once TypeScript 5.6 is the minimum.\n */\nexport interface AsyncIterable<T, TReturn, TNext> {\n  [Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>\n}\n\n/**\n * Determines if the given function is an iterator.\n */\nexport function isIterable<IteratorType>(\n  fn: any,\n): fn is\n  | Iterable<IteratorType, IteratorType, IteratorType>\n  | AsyncIterable<IteratorType, IteratorType, IteratorType> {\n  if (!fn) {\n    return false\n  }\n\n  return (\n    Reflect.has(fn, Symbol.iterator) || Reflect.has(fn, Symbol.asyncIterator)\n  )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBO,SAAS,WACd,IAG0D;AAC1D,MAAI,CAAC,IAAI;AACP,WAAO;AAAA,EACT;AAEA,SACE,QAAQ,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,IAAI,OAAO,aAAa;AAE5E;","names":[]}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.25 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.24 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.23 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.22 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.21 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.20 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.19 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.18 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.17 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.16 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.15 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.14 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.13 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.12 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.11 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.10 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.9 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.8 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map
clapton-0.0.7 lib/clapton/javascripts/node_modules/msw/lib/core/utils/internal/isIterable.js.map