12 lines
236 B
JavaScript
Raw Normal View History

2025-04-23 09:34:08 +08:00
define(function () {
// Internal wrapper to enable match-by-value mode in `linearSearch`.
function byValue(value) {
if (!(this instanceof byValue)) return new byValue(value);
this.value = value;
}
return byValue;
});