Sha256: 80bab1e61974d1b44d2af587c76d38908a0b080e6a503b3085b3e51463ae667f

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=c8316a2887effed347cc4cb7a032366093fb0e5ea6df05340f35d333b0a8f5d3: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"%LÜ`7‹¬ºŸ-"(Oû‰Íc|j|N
Õ\uùKm:idI"Ec8316a2887effed347cc4cb7a032366093fb0e5ea6df05340f35d333b0a8f5d3;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/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.29 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.28 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.27 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.26 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.25 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.24 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache
izi_lightup-1.0.23 spec/dummy/tmp/cache/assets/sprockets/v3.0/vQ/vQbic3Bw33s-_dbaDDutszHzE12TrODzIEH2RXOzhBM.cache