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.

10 lines
278 B

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