Sha256: 4a220fbc8285f556e63abb065f4135fd0b024dae4caab92c82da4dff3a843579

Contents?: true

Size: 1.89 KB

Versions: 8

Compression:

Stored size: 1.89 KB

Contents

{:uriI"Æfile:///Users/izik/www/sparse/izi_lightup/spec/javascripts/helpers/extend/detect_item.js?type=application/javascript&pipeline=self&id=26c3e2af6ec93dada8b3b6291ee931e7c8497321fb63a3fbb0528eaba352a24c:ET:load_pathI"8/Users/izik/www/sparse/izi_lightup/spec/javascripts;T:
filenameI"V/Users/izik/www/sparse/izi_lightup/spec/javascripts/helpers/extend/detect_item.js;T:	nameI"helpers/extend/detect_item;T:logical_pathI"'helpers/extend/detect_item.self.js;T:content_typeI"application/javascript;T:sourceI"4(function (self) {
  function isItemMatched(item, matcher, attribute) {
    var value = typeof attribute === undefined ? item : item[attribute];
    if (typeof matcher === "function") {
      return matcher.call(items, value);
    }

    if (typeof matcher === "object" && RegExp.prototype.isPrototypeOf(matcher)) {
      if (typeof value !== "string") value = value.toString();

      return matcher.test(value);
    }

    return matcher == value;
  }

  self.detectItem = function (items, matcher, attribute) {
    if (!Array.isArray(items)) return;

    for (var i = 0; i < items.length; i++) {
      if (isItemMatched(items[i], matcher, attribute)) {
        return items[i];
      }
    }
  };

  self.detectByTitle = function (items, matcher) {
    return self.detectItem(items, matcher, "title");
  };
})(this);
;T:
metadata{:dependencieso:Set:
@hash}
I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"dfile-digest:///Users/izik/www/sparse/izi_lightup/spec/javascripts/helpers/extend/detect_item.js;TTF:
requiredo;;}F:stubbedo;;}F:
linkso;;}F:charsetI"
utf-8;F:digest"%d„vÆ;#/¶ÿE:s]¨Êr3÷Né	ßK uk¯:lengthi4:dependencies_digest"%ëe5¤ù‚Šÿ¢Ù>ÜuHò
J@?\õÎM’´mû™¢:idI"E26c3e2af6ec93dada8b3b6291ee931e7c8497321fb63a3fbb0528eaba352a24c;F:
mtimel+â$]b

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
izi_lightup-1.0.31 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.29 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.28 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.27 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.26 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.25 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.24 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache
izi_lightup-1.0.23 spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9u25pFeClbLYbNpyFhaJ5yE4fABRCXYzBBhzad4M9s.cache