validate-encoding

Validates whether a string matches the name of the encoding or not

Usage no npm install needed!

<script type="module">
  import validateEncoding from 'https://cdn.skypack.dev/validate-encoding';
</script>

README

validate-encoding

npm license downloads

Validates whether a string matches the name of the encoding or not. Full list of the valid encoding names here

usage

const ve = require('validate-encoding');

ve('utf8');   // invalid
ve('utf-8');  // valid

API

exports(input)
  • @param {string} input - candidate to validate
  • @returns {bool}

Licsense

MIT, 2015 (c) Dmitry Tsvettsikh