UNPKG

@dcoffey/espells

Version:

Pure JS/TS spellchecker, using Hunspell dictionaries. Based on Spylls.

25 lines 901 B
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /** Context object for handling a {@link AffixForm} decomposing state. */ export class LKFlags { constructor(flags = {}) { const { prefix = new Set(), suffix = new Set(), forbidden = new Set() } = flags; this.prefix = prefix; this.suffix = suffix; this.forbidden = forbidden; } replace(flags) { const newFlags = { prefix: this.prefix, suffix: this.suffix, forbidden: this.forbidden, ...flags }; return new LKFlags(newFlags); } static from(prefix, suffix, forbidden) { return new LKFlags({ prefix, suffix, forbidden }); } } //# sourceMappingURL=lk-flags.js.map