Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it( "should iterate over an objects properties", function () {
const size = Object.keys( util ).length;
const entries = [];
util.each( util, ( value, key ) => {
entries.push( { key, value } );
} );
expect( entries.length ).to.equal( size );
entries.forEach( entry => {
expect( util )
.to.have.ownProperty( entry.key )
.which.equals( entry.value );
} );
} );
it( "applies a transformation on each properties value", function () {
util.each( result, property => {
expect( property ).to.be.a( "string" );
} );
} );
grammar( node ) {
delete node.location;
delete node._alwaysConsumesOnSuccess;
if ( node.initializer ) {
strip( node.initializer );
}
if ( node.comments ) {
util.each( node.comments, stripLeaf );
}
node.rules.forEach( strip );
},