How to use the reftools/lib/visit.js.visit function in reftools

To help you get started, we’ve selected a few reftools examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mermade / widdershins / lib / common.js View on Github external
function clean(obj) {
    if (typeof obj === 'undefined') return {};
    visit(obj,{},{filter:function(obj,key,state){
        if (!key.startsWith('x-widdershins')) return obj[key];
    }});
    return obj;
}