MCPcopy Create free account
hub / github.com/awslabs/llrt / isEncoding

Method isEncoding

types/buffer.d.ts:213–213  ·  view source on GitHub ↗

* Returns `true` if `encoding` is the name of a supported character encoding, * or `false` otherwise. * * ```js * import { Buffer } from 'buffer'; * * console.log(Buffer.isEncoding('utf8')); * // Prints: true * * console.log(Buffer.isEncoding('hex'));

(encoding: string)

Source from the content-addressed store, hash-verified

211 * @param encoding A character encoding name to check.
212 */
213 isEncoding(encoding: string): encoding is BufferEncoding;
214 /**
215 * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.
216 *

Callers 1

buffer.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected