Skip to content

version 0.8.0

Compare
Choose a tag to compare
@fntz fntz released this 16 May 15:09
· 29 commits to master since this release
  • vanillajs adapter (use Sirius.js without framework overhead)
  • add support for object in attributes
class Model extends Sirius.BaseModel
  @attrs: [ {obj: {}} ]

# now, when set new value for `obj` this value must be object
model = new Model()
model.obj(123) # => throw Error
model.obj({val: 123}) => ok
  • imporove support for work with logical elements (checkbox, and radio)
  • add indexes in collection (improve speed for find models in collection)
  • skip attribute for models:
 # json resposne from server: {id: 1, foo: test, bar: test1}

class ModelA extends Sirius.BaseModel
  @attrs: ["id"]

class ModelB extends Sirius.BaseModel
  @attrs: ["id"]
  @skip : true

obj = {"id": 1, "foo" : "bar" }
new ModelA(obj) # => error
new ModelB(obj) # => ok