Skip to content

Instantly share code, notes, and snippets.

@pioh
Created September 11, 2018 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pioh/aa722319426c32144756877bcf01c389 to your computer and use it in GitHub Desktop.
Save pioh/aa722319426c32144756877bcf01c389 to your computer and use it in GitHub Desktop.
example
let configReader = new ConfigReader("path/to/folder/with/all/config/scheme")
let config = configReader.read()
config.calc("filter.fields") // undefined
config.addEnvironment({user: {bank: vtb}})
config.calc("filter.fields") // ["realtyType", "sources"]
config.calc("filter.field.realtyType.title") // Тип объекта
config.addEnvironment({user: {bank: "rzd"}})
config.calc("filter.field.realtyType.title") // Вид недвижимости
let config2 = config.fork().addEnvironment({user: {bank: "vtb"}})
config2.calc("filter.field.realtyType.title") // Тип объекта
config.calc("filter.field.realtyType.title") // Вид недвижимости
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment