Skip to content
Malexion edited this page Nov 6, 2016 · 1 revision

new __.lib.Config([options])

  • [options] [Optional] Option params for initial config settings.

Examples

var config = new __.lib.Config({
   foo: 'bar',
   layer1: new __.lib.Config({
      setting: 1,
      switch: 2
   }),
   step1: {
      setting: 1,
      switch: 2
   }
});

config.update({
   foo: 22,
   layer1: {
      switch: 300
   },
   step1: {
      switch: 300
   }
   extra: 'setting'
});

console.log(config);