Skip to content

Export class Errors correcty

Compare
Choose a tag to compare
@alexbol99 alexbol99 released this 08 Dec 15:50
· 56 commits to master since this release

What's Changed

  • Export errors correctly by @alexbol99 in #158
    Class Error exported now, one can check flatten-js errors like this:
import {Errors, vector} from "@flatten-js/core";

try {
    const v = vector(0,0)
    v.normalize()
}
catch (e) {
    console.log(e.message === Errors.ZERO_DIVISION.message)
}

Full Changelog: v1.4.5...v1.4.6