mobx-bonsai
Version:
A fast lightweight alternative to MobX-State-Tree + Y.js two-way binding
17 lines (14 loc) • 317 B
text/typescript
import * as mobx from "mobx"
const mobx6 = {
makeObservable: (mobx as any)[
// just to ensure import * is kept properly
String.fromCharCode("l".charCodeAt(0) + 1) + "akeObservable"
],
}
export function getMobxVersion(): number {
if (mobx6.makeObservable!) {
return 6
} else {
return 5
}
}