Sha256: ea48c9416a0ae2d4e0a1cb3fc03f7976801c97d5b5b2448d0dcd48bfd4a9acf7

Contents?: true

Size: 422 Bytes

Versions: 10

Compression:

Stored size: 422 Bytes

Contents

let CONTAINER;
let isInitialized = false;

// exported so that it can be used in tests
export function init() {
  const dataset = document.getElementById("preloaded-data").dataset;
  CONTAINER = Em.$.extend(JSON.parse(dataset.preloaded), {
    rootPath: dataset.rootPath
  });
  isInitialized = true;
}

export default {
  get(key) {
    if (!isInitialized) {
      init();
    }
    return Em.get(CONTAINER, key);
  }
};

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
logster-2.5.1 client-app/app/lib/preload.js
logster-2.5.0 client-app/app/lib/preload.js
logster-2.4.2 client-app/app/lib/preload.js
logster-2.4.1 client-app/app/lib/preload.js
logster-2.4.0 client-app/app/lib/preload.js
logster-2.3.3 client-app/app/lib/preload.js
logster-2.3.2 client-app/app/lib/preload.js
logster-2.3.1 client-app/app/lib/preload.js
logster-2.3.0 client-app/app/lib/preload.js
logster-2.2.0 client-app/app/lib/preload.js