MCPcopy Create free account
hub / github.com/select2/select2 / onlyItem

Function onlyItem

src/js/select2/data/array.js:45–49  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

43
44 // Filter out all items except for the one passed in the argument
45 function onlyItem (item) {
46 return function () {
47 return $(this).val() == item.id;
48 };
49 }
50
51 for (var d = 0; d < data.length; d++) {
52 var item = this._normalizeItem(data[d]);

Callers 1

array.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…