UNPKG

@kayahr/text-encoding

Version:
18 lines 464 B
/* * Copyright (C) 2021 Klaus Reimer <k@ailis.de> * See LICENSE.md for licensing information. */ /** * Base class for encoders. */ export class AbstractEncoder { /** * Fails the encoding by throwing an exception * * @param codePoint - The code point which could not be encoded. */ fail(codePoint) { throw new TypeError(`The code point ${codePoint} could not be encoded`); } } //# sourceMappingURL=AbstractEncoder.js.map