* 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)
| 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 | * |