You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default-encoding.js 386B

123456789101112
  1. var defaultEncoding
  2. /* istanbul ignore next */
  3. if (global.process && global.process.browser) {
  4. defaultEncoding = 'utf-8'
  5. } else if (global.process && global.process.version) {
  6. var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
  7. defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
  8. } else {
  9. defaultEncoding = 'utf-8'
  10. }
  11. module.exports = defaultEncoding