flux icon indicating copy to clipboard operation
flux copied to clipboard

Make "invariant" as a separated module

Open Kureev opened this issue 11 years ago • 2 comments

Dear core team,

Could you make "invariant" as a standalone dependency (or as least export it as require('flux').invariant) to allow other users use it in their code.

For example, i'm developing library, which using your flux dispatcher as an underlying layer for my own dispatcher. So, i'd like to use your assert mechanism in my code too.

Now i'm using

var invariant = require('flux/lib/invariant');

but not sure it's a best idea.

Kureev avatar Feb 18 '15 11:02 Kureev

@zpao is working on this, but it probably won't live here. I think eventually we will require invariant from another module.

fisherwebdev avatar Feb 24 '15 17:02 fisherwebdev

@fisherwebdev Oh I didn't know this. @zpao Let me know if you guys want to own this https://www.npmjs.com/package/invariant or if it's fine like that

zertosh avatar Feb 25 '15 04:02 zertosh