@altostra/core
Version:
Core library for shared types and logic
1 lines • 662 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PartiallyMappedAlphabet=void 0;const MappedAlphabetBase_1=require("./MappedAlphabetBase");class PartiallyMappedAlphabet extends MappedAlphabetBase_1.MappedAlphabetBase{has(e){return e in this._reverseMapping?this._base.has(this._reverseMapping[e]):this._base.has(e)}getAt(e){const a=this._base.getAt(e);return a in this._mapping?this._mapping[a]:a}indexOf(e){return this._base.indexOf(e in this._reverseMapping?this._reverseMapping[e]:e)}*[Symbol.iterator](){for(const e of this._base)yield e in this._mapping?this._mapping[e]:e}}exports.PartiallyMappedAlphabet=PartiallyMappedAlphabet;