jonschlinkert / is-primitive

Is the typeof value a javascript primitive?
MIT License
37 stars 9 forks source link

Include an ESM build? #8

Closed Xotic750 closed 5 years ago

Xotic750 commented 5 years ago

What do you think of including an ESM build?

Additional file index.esm.js

export default function isPrimitive(val) {
  if (typeof val === 'object') {
    return val === null;
  }
  return typeof val !== 'function';
}

and add to package.json

"module": "index.esm.js"