I had to place the method on window.API itself instead of on the cmi because I needed access to the setCMIValue method, and I didn't want to expose it so that the cmi object could access it.
So, instead of having a nicer-named window.API.cmi.fromJSON(), here is my take on window.API.loadFromJSON()
I had to place the method on window.API itself instead of on the cmi because I needed access to the setCMIValue method, and I didn't want to expose it so that the cmi object could access it.
So, instead of having a nicer-named
window.API.cmi.fromJSON()
, here is my take onwindow.API.loadFromJSON()
I also added an example on the README