UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

26 lines (20 loc) 615 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; class BitIdAndValueArray extends Array { getValue(id) { const found = this.find(item => item.id.isEqual(id)); return found ? found.value : null; } getValueIgnoreVersion(id) { const found = this.find(item => item.id.isEqualWithoutVersion(id)); return found ? found.value : null; } getValueIgnoreScopeAndVersion(id) { const found = this.find(item => item.id.isEqualWithoutScopeAndVersion(id)); return found ? found.value : null; } } exports.default = BitIdAndValueArray;