array/some.js

From disqus.com, 7 Months ago, written in JavaScript, viewed 3 times. This paste is a reply to indexOf.js from disqus.com - view diff
URL https://pastebin.freepbx.org/view/d430bd33 Embed
Download Paste or View Raw
  1. define('core/utils/array/some',[],function () {
  2.     'use strict';
  3.  
  4.     return function some(arr, callback, that) {
  5.         for (var i = 0; i < arr.length; ++i) {
  6.             if (callback.call(that, arr[i], i, arr))
  7.                 return true;
  8.         }
  9.  
  10.         return false;
  11.     };
  12. });
  13.  
  14. // https://c.disquscdn.com/next/next-core/core/utils/array/some.js
  15. // https://a.disquscdn.com/next/next-core/core/utils/array/some.js

Replies to array/some.js rss

Title Name Language When
each.js disqus.com javascript 7 Months ago.

Reply to "array/some.js"

Here you can reply to the paste above