How to use the harmony-reflect.get function in harmony-reflect

To help you get started, we’ve selected a few harmony-reflect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Aferz / flask / src / core / Configurator.js View on Github external
registerGlobalDecorators(confObject) {
    const decorators = Reflect.get(confObject, 'decorators') || []
    this.registerDecorators(GLOBAL_NAMESPACE_DECORATOR, decorators)
  }
github Aferz / flask / src / core / Configurator.js View on Github external
registerServices(confObject) {
    const services = Reflect.get(confObject, 'services') || {}

    for (let alias in services) {
      const service = Reflect.get(services[alias], 'service')
      const args = Reflect.get(services[alias], 'arguments') || []
      const tags = Reflect.get(services[alias], 'tags') || []
      const decorators = Reflect.get(services[alias], 'decorators') || []
      const listeners = Reflect.get(services[alias], 'listeners') || {}
      const isSingleton = Reflect.get(services[alias], 'singleton') || false

      this.container.addService(alias, service, args, isSingleton)

      this.registerTags(alias, tags, this.container.getConfigValue('serviceDelimiter'))
      this.registerListeners(alias, listeners)
      this.registerDecorators(alias, decorators)
    }
  }
github Aferz / flask / src / core / Configurator.js View on Github external
registerServices(confObject) {
    const services = Reflect.get(confObject, 'services') || {}

    for (let alias in services) {
      const service = Reflect.get(services[alias], 'service')
      const args = Reflect.get(services[alias], 'arguments') || []
      const tags = Reflect.get(services[alias], 'tags') || []
      const decorators = Reflect.get(services[alias], 'decorators') || []
      const listeners = Reflect.get(services[alias], 'listeners') || {}
      const isSingleton = Reflect.get(services[alias], 'singleton') || false

      this.container.addService(alias, service, args, isSingleton)

      this.registerTags(alias, tags, this.container.getConfigValue('serviceDelimiter'))
      this.registerListeners(alias, listeners)
      this.registerDecorators(alias, decorators)
    }
  }
github Aferz / flask / src / core / Configurator.js View on Github external
registerConfigValues(confObject) {
    const values = Reflect.get(confObject, 'config') || {}

    for (let key in values) {
      this.container.addConfigValue(key, values[key])
    }
  }
github Aferz / flask / src / core / DecoratorResolver.js View on Github external
find(alias) {
    return Reflect.get(this.decorators, alias) || []
  }
github Aferz / flask / src / core / Configurator.js View on Github external
registerServices(confObject) {
    const services = Reflect.get(confObject, 'services') || {}

    for (let alias in services) {
      const service = Reflect.get(services[alias], 'service')
      const args = Reflect.get(services[alias], 'arguments') || []
      const tags = Reflect.get(services[alias], 'tags') || []
      const decorators = Reflect.get(services[alias], 'decorators') || []
      const listeners = Reflect.get(services[alias], 'listeners') || {}
      const isSingleton = Reflect.get(services[alias], 'singleton') || false

      this.container.addService(alias, service, args, isSingleton)

      this.registerTags(alias, tags, this.container.getConfigValue('serviceDelimiter'))
      this.registerListeners(alias, listeners)
      this.registerDecorators(alias, decorators)
    }
  }
github Aferz / flask / src / util / config.js View on Github external
const registerServices = (services, flask) => {
  for (let alias in services) {
    const service = Reflect.get(services[alias], 'service')
    const args = Reflect.get(services[alias], 'arguments') || []
    const tags = Reflect.get(services[alias], 'tags') || []
    const decorators = Reflect.get(services[alias], 'decorators') || []
    const listeners = Reflect.get(services[alias], 'listeners') || {}
    const isSingleton = Reflect.get(services[alias], 'singleton') || false

    isSingleton === true
    ? flask.singleton(alias, service, args)
    : flask.service(alias, service, args)

    registerTags(alias, tags, flask)
    registerDecorators(alias, decorators, flask)
    registerServiceListeners(alias, listeners, flask)
  }
}
github Aferz / flask / src / core / Configurator.js View on Github external
registerGlobalListeners(confObject) {
    const listeners = Reflect.get(confObject, 'listeners') || {}
    this.registerListeners(GLOBAL_NAMESPACE_LISTENERS, listeners)
  }

harmony-reflect

ES5 shim for ES6 (ECMAScript 6) Reflect and Proxy objects

(Apache-2.0 OR MPL-1.1)
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis