Sha256: e4246dd68cf0d13e8deaf485d78b701ce535b244fc6e08bc40babb0a0020fff7

Contents?: true

Size: 465 Bytes

Versions: 33

Compression:

Stored size: 465 Bytes

Contents

function getProperty(target, prop) {
    if (typeof prop === "string") {
        for (const [name, value] of Object.entries(target)) {
            if (prop.toLowerCase() === name.toLowerCase()) {
                return value;
            }
        }
    }
    return undefined;
}
export const proxyHeaders = (object) => new Proxy(object, {
    get: (target, prop) => getProperty(target, prop),
    has: (target, prop) => getProperty(target, prop) !== undefined
});

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.40 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.39 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.38 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.32 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.31 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.30 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.29 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.28 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.27 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.26 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.25 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.24 node_modules/form-data-encoder/lib/util/proxyHeaders.js
immosquare-cleaner-0.1.23 node_modules/form-data-encoder/lib/util/proxyHeaders.js