/* global sauce */

window.sauce = window.sauce || {};

sauce.ns = async function(ns, callback) {
    let offt = sauce;
    const assignments = callback && await callback(offt);
    for (const x of ns.split('.')) {
        if (!offt[x]) {
            offt = (offt[x] = {});
        }
    }
    if (assignments) {
        Object.assign(offt, assignments);
    }
    return offt;
};

/* global sauce */

window.sauce = window.sauce || {};

sauce.ns = async function(ns, callback) {
    let offt = sauce;
    for (const x of ns.split('.')) {
        if (!offt[x]) {
            offt = (offt[x] = {});
        }
    }
    const assignments = callback && await callback(offt);
    if (assignments) {
        Object.assign(offt, assignments);
    }
    return offt;
};

Fix offset issue with sauce.ns
Fix offset issue with sauce.ns

Wasn't being used, but noticed it.
