Added example

This commit is contained in:
Kevin Jahns
2014-08-05 05:00:22 +02:00
parent 6c34d97432
commit 7f6ea1e291
55 changed files with 1185 additions and 229 deletions

View File

@@ -72,8 +72,13 @@ class JsonYatta
#
# @see JsonType.value
#
value : ()->
@root_element.value
Object.defineProperty JsonYatta.prototype, 'value',
get : -> @root_element.value
set : (o)->
if o.constructor is {}.constructor
for o_name,o_obj of o
@val(o_name, o_obj, 'immutable')
else
throw new Error "You must only set Object values!"
window?.JsonYatta = JsonYatta
module.exports = JsonYatta