AsyncBanana / microdiff

A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CommonJS support

gustavopch opened this issue · comments

I'm trying to require('microdiff') but it throws ERR_REQUIRE_ESM. I'm using Node.js 12. Don't you think CommonJS should still be supported?

You are probably right. I will work on adding CommonJS support and will tell you when it is added.

CommonJS should work now out of the box if you install v1.1.0+. You can use it like this

const diff = require("microdiff").default

Tell me if you have any problems with it.