import { Buffer } from "https://deno.land/x/canvaseno@v1.0.2/deps.ts";
Returns true
if encoding
is the name of a supported character encoding,
or false
otherwise.
import { Buffer } from 'buffer';
console.log(Buffer.isEncoding('utf8'));
// Prints: true
console.log(Buffer.isEncoding('hex'));
// Prints: true
console.log(Buffer.isEncoding('utf/8'));
// Prints: false
console.log(Buffer.isEncoding(''));
// Prints: false