How to use the iconv function in iconv

To help you get started, we’ve selected a few iconv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openaq / openaq-fetch / adapters / moscow.js View on Github external
}, (err, res, data) => {
      if (err || res.statusCode !== 200) {
        return done(null, []);

      data = Buffer.from(data, 'binary');
      var iconv = new Iconv('windows-1251', 'utf-8');
      data = iconv.convert(data).toString();

      let stationRegexp = /air-today\/station\/(\w*)\//;
      let stationId = stationRegexp.exec(link)[1];

      formatData(data, stationId, (measurements) => {
        return done(null, measurements);


Text recoding in JavaScript for fun and profit!

Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular iconv functions