Sha256: e3ef60c3bb5c31a9f105b46022969e79dd0ed5826af905aba6f287395691f57a

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

import { DEBUG } from '@glimmer/env';
export let HANDLERS = {};
let registerHandler = () => { };
let invoke = () => { };
if (DEBUG) {
    registerHandler = function registerHandler(type, callback) {
        let nextHandler = HANDLERS[type] || (() => { });
        HANDLERS[type] = (message, options) => {
            callback(message, options, nextHandler);
        };
    };
    invoke = function invoke(type, message, test, options) {
        if (test) {
            return;
        }
        let handlerForType = HANDLERS[type];
        if (handlerForType) {
            handlerForType(message, options);
        }
    };
}
export { registerHandler, invoke };

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
discourse-ember-source-3.6.0.0 dist/es/@ember/debug/lib/handlers.js
discourse-ember-source-3.5.1.1 dist/es/@ember/debug/lib/handlers.js
discourse-ember-source-3.5.1.0 dist/dist/es/@ember/debug/lib/handlers.js