Sha256: f078f72b513b94dc3b34b434a2149950c91edfc4c58d29b098cad8111a27587e

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

let locale = 'en';
let protocolWithHost = null;
let scope = null;

class Configurator {
  get locale() {
    return locale;
  }

  set locale(val) {
    return locale = val;
  }

  get protocolWithHost() {
    return protocolWithHost;
  }

  set protocolWithHost(val) {
    if(!val)
      return protocolWithHost = null;
    if(val[val.length - 1] === '/')
      return protocolWithHost = val.slice(0, val.length - 1);
    return protocolWithHost = val;
  }

  get scope() {
    return scope;
  }

  set scope(val) {
    return scope = val;
  }
}

const Config = new Configurator;

export default Config;

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
loco-rails-3.0.0 test/dummy/node_modules/loco-js-model/src/config.js