Sha256: 476a8c7e78cf1a7548ee0645146c71dcad027c96f932b30c09ac6abe60550d1d

Contents?: true

Size: 1.12 KB

Versions: 91

Compression:

Stored size: 1.12 KB

Contents

export function merge(...sets) {
    if (sets.length > 1) {
        sets[0] = sets[0].slice(0, -1);
        const xl = sets.length - 1;
        for (let x = 1; x < xl; ++x) {
            sets[x] = sets[x].slice(1, -1);
        }
        sets[xl] = sets[xl].slice(1);
        return sets.join('');
    }
    else {
        return sets[0];
    }
}
export function subexp(str) {
    return "(?:" + str + ")";
}
export function typeOf(o) {
    return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase());
}
export function toUpperCase(str) {
    return str.toUpperCase();
}
export function toArray(obj) {
    return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];
}
export function assign(target, source) {
    const obj = target;
    if (source) {
        for (const key in source) {
            obj[key] = source[key];
        }
    }
    return obj;
}
//# sourceMappingURL=util.js.map

Version data entries

91 entries across 91 versions & 11 rubygems

Version Path
govuk_publishing_components-17.8.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.7.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.6.1 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.6.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.5.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.4.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.3.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.2.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.1.1 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.1.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-17.0.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.29.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.28.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.27.1 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.27.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.26.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.25.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.24.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.23.0 node_modules/uri-js/dist/esnext/util.js
govuk_publishing_components-16.22.0 node_modules/uri-js/dist/esnext/util.js