How to use the getDecoder function from iconv-lite

Find comprehensive JavaScript iconv-lite.getDecoder code examples handpicked from public code repositorys.

40
41
42
43
44
45
46
47
48
49
50
51


function getDecoder (encoding) {
  if (!encoding) return null


  try {
    return iconv.getDecoder(encoding)
  } catch (e) {
    // error getting decoder
    if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e

fork icon0
star icon0
watch icon0

+ 2 other calls in file