Sha256: 20f2cdb54bf9bd650c5cb3d973032309749dab0cebe5947aec650d702fd3dcec

Contents?: true

Size: 581 Bytes

Versions: 47

Compression:

Stored size: 581 Bytes

Contents

"use strict";

var isArguments    = require("es5-ext/function/is-arguments")
  , isString       = require("es5-ext/string/is-string")
  , ArrayIterator  = require("./array")
  , StringIterator = require("./string")
  , iterable       = require("./valid-iterable")
  , iteratorSymbol = require("es6-symbol").iterator;

module.exports = function (obj) {
	if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol]();
	if (isArguments(obj)) return new ArrayIterator(obj);
	if (isString(obj)) return new StringIterator(obj);
	return new ArrayIterator(obj);
};

Version data entries

47 entries across 47 versions & 3 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/es6-iterator/get.js
govuk_publishing_components-18.0.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.21.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.20.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.19.1 node_modules/es6-iterator/get.js
govuk_publishing_components-17.19.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.18.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.17.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.16.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.15.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.14.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.13.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.12.2 node_modules/es6-iterator/get.js
govuk_publishing_components-17.12.1 node_modules/es6-iterator/get.js
govuk_publishing_components-17.12.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.11.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.10.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.9.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.8.0 node_modules/es6-iterator/get.js
govuk_publishing_components-17.7.0 node_modules/es6-iterator/get.js