Sha256: 0f3c469a78739a9f2414c6221d1fe1ad99a6ea4aa2feb7a6571e8c440d27118b

Contents?: true

Size: 540 Bytes

Versions: 46

Compression:

Stored size: 540 Bytes

Contents

"use strict";

var callable    = require("../../../object/valid-callable")
  , ensureValue = require("../../../object/valid-value")
  , some        = Array.prototype.some
  , apply       = Function.prototype.apply;

module.exports = function (predicate /*, thisArg*/) {
	var k, self;
	self = Object(ensureValue(this));
	callable(predicate);

	return some.call(
		self,
		function (value, index) {
			if (apply.call(predicate, this, arguments)) {
				k = index;
				return true;
			}
			return false;
		},
		arguments[1]
	)
		? k
		: -1;
};

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.21.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.20.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.19.1 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.19.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.18.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.17.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.16.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.15.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.14.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.13.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.12.2 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.12.1 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.12.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.11.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.10.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.9.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.8.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.7.0 node_modules/es5-ext/array/#/find-index/shim.js
govuk_publishing_components-17.6.1 node_modules/es5-ext/array/#/find-index/shim.js