Open radubrehar opened 8 years ago
Not mandatory for tools like webpack
, since they know how to handle the import
even if module.exports
alone is used in the module, but would be a nice addition anyway :)
@hughsk would you accept a PR for this? I'd be happy to submit.
We should just switch to es modules since it's a standard now.
Recently created a clamp lib with ES module support for use in some personal projects. Sharing it here just in case anyone finds it useful: https://github.com/rocktimsaikia/clamp-v2
It would have been nice to work on getting clamp
updated in npm instead of clogging the ecosystem with another dupe module.
Yeah true but since it does not seem to be active anymore, just created an updated version with ESM and type support.
First 2 lines would be:
So people can import it like
import clamp from 'clamp'