lib/ui/charting/js_charting.js
function(props, regex) {
            if(!(regex instanceof RegExp)) {
                return props;
            }
            var key,
                filtered = {};

            for(key in props) {
                if(props.hasOwnProperty(key) && regex.test(key)) {
                    filtered[key] = props[key];
                }
            }
            return filtered;
        }
function(props, regex) {
            if(!(regex instanceof RegExp)) {
                return props;
            }
            var key,
                filtered = {};

            for(key in props) {
                if(props.hasOwnProperty(key) && regex.test(key)) {
                    filtered[key] = props[key];
                }
            }
            return filtered;
        }
function ( props , regex ) { if ( ! ( regex instanceof RegExp ) ) { return props ; } var key , filtered = { } ; for ( key in props ) { if ( props . hasOwnProperty ( key ) && regex . test ( key ) ) { filtered [ key ] = props [ key ] ; } } return filtered ; }
uses the given regex to filter out any properties whose key doesn't match will return an empty object if the props input is not a map
uses the given regex to filter out any properties whose key doesn t match will return an empty object if the props input is not a map