davidmarkclements / fast-safe-stringify

Safely and quickly serialize JavaScript objects
MIT License
348 stars 27 forks source link

Type module support #65

Closed gustawdaniel closed 6 months ago

gustawdaniel commented 1 year ago

I have type: module in package.json

Now I am using

import safeStringify from 'fast-safe-stringify';

and

safeStringify.default(incident)

I would prefer to hide this .defaut in the library code so it should be built as esm and cjs version.

mcollina commented 1 year ago

Would you like to send a PR to add a module.exports.stringify = safeStringify?