diff --git a/enumerable-properties-in/README.md b/enumerable-properties-in/README.md index e95f5398..5e82fdc6 100644 --- a/enumerable-properties-in/README.md +++ b/enumerable-properties-in/README.md @@ -64,11 +64,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var enumerablePropertiesIn = require( '@stdlib/utils/enumerable-properties-in' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -83,11 +79,9 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'foo' ) ] = 'bar'; } -obj = new Foo(); -props = enumerablePropertiesIn( obj ); - -console.log( props ); -// e.g., => [ 'a', 'foo', ... ] +var obj = new Foo(); +var props = enumerablePropertiesIn( obj ); +// e.g., returns [ 'a', 'foo', ... ] ``` diff --git a/enumerable-properties-in/examples/index.js b/enumerable-properties-in/examples/index.js index b78674df..3fff7c8a 100644 --- a/enumerable-properties-in/examples/index.js +++ b/enumerable-properties-in/examples/index.js @@ -22,11 +22,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var enumerablePropertiesIn = require( './../lib' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -41,8 +37,7 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'foo' ) ] = 'bar'; } -obj = new Foo(); -props = enumerablePropertiesIn( obj ); - +var obj = new Foo(); +var props = enumerablePropertiesIn( obj ); console.log( props ); -// => [ 'a', 'foo', ... ] +// e.g., => [ 'a', 'foo', ... ] diff --git a/inherited-properties/README.md b/inherited-properties/README.md index a60db1ba..d4753ba8 100644 --- a/inherited-properties/README.md +++ b/inherited-properties/README.md @@ -67,11 +67,7 @@ var Symbol = require( '@stdlib/symbol/ctor' ); var defineProperty = require( '@stdlib/utils/define-property' ); var inheritedProperties = require( '@stdlib/utils/inherited-properties' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -110,11 +106,9 @@ if ( hasSymbols ) { }); } -obj = new Foo(); -props = inheritedProperties( obj ); - -console.log( props ); -// => [ ..., 'c', 'bip', ... ] +var obj = new Foo(); +var props = inheritedProperties( obj ); +// returns [ ..., 'c', 'bip', ... ] ``` diff --git a/inherited-properties/examples/index.js b/inherited-properties/examples/index.js index ccc0d30a..a5b3ce47 100644 --- a/inherited-properties/examples/index.js +++ b/inherited-properties/examples/index.js @@ -23,11 +23,7 @@ var Symbol = require( '@stdlib/symbol/ctor' ); var defineProperty = require( './../../define-property' ); var inheritedProperties = require( './../lib' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -66,8 +62,7 @@ if ( hasSymbols ) { }); } -obj = new Foo(); -props = inheritedProperties( obj ); - +var obj = new Foo(); +var props = inheritedProperties( obj ); console.log( props ); -// => [ 'c', 'bip', ... ] +// => [ ..., 'c', 'bip', ... ] diff --git a/inherited-property-symbols/README.md b/inherited-property-symbols/README.md index b62cb839..19f417cf 100644 --- a/inherited-property-symbols/README.md +++ b/inherited-property-symbols/README.md @@ -65,11 +65,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var inheritedPropertySymbols = require( '@stdlib/utils/inherited-property-symbols' ); -var hasSymbols; -var symbols; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { if ( hasSymbols ) { @@ -82,10 +78,9 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'c' ) ] = 'd'; } -obj = new Foo(); -symbols = inheritedPropertySymbols( obj ); - -console.log( symbols ); +var obj = new Foo(); +var symbols = inheritedPropertySymbols( obj ); +// e.g., returns [ Symbol(c) ] ``` diff --git a/inherited-property-symbols/examples/index.js b/inherited-property-symbols/examples/index.js index 7eca3fcd..e3ed5e97 100644 --- a/inherited-property-symbols/examples/index.js +++ b/inherited-property-symbols/examples/index.js @@ -22,11 +22,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var inheritedPropertySymbols = require( './../lib' ); -var hasSymbols; -var symbols; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { if ( hasSymbols ) { @@ -39,7 +35,7 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'c' ) ] = 'd'; } -obj = new Foo(); -symbols = inheritedPropertySymbols( obj ); - +var obj = new Foo(); +var symbols = inheritedPropertySymbols( obj ); console.log( symbols ); +// e.g., => [ Symbol( 'c' ) ] diff --git a/nonenumerable-properties-in/README.md b/nonenumerable-properties-in/README.md index 692bcbaa..384bf4f7 100644 --- a/nonenumerable-properties-in/README.md +++ b/nonenumerable-properties-in/README.md @@ -72,11 +72,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var nonEnumerablePropertiesIn = require( '@stdlib/utils/nonenumerable-properties-in' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'a'; @@ -115,11 +111,9 @@ if ( hasSymbols ) { }); } -obj = new Foo(); -props = nonEnumerablePropertiesIn( obj ); - -console.log( props ); -// e.g., => [ 'b', 'beep', ... ] +var obj = new Foo(); +var props = nonEnumerablePropertiesIn( obj ); +// returns [ 'b', 'beep', ... ] ``` diff --git a/nonenumerable-properties-in/examples/index.js b/nonenumerable-properties-in/examples/index.js index 41d2bc1e..91a06d70 100644 --- a/nonenumerable-properties-in/examples/index.js +++ b/nonenumerable-properties-in/examples/index.js @@ -23,11 +23,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var nonEnumerablePropertiesIn = require( './../lib' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'a'; @@ -66,8 +62,7 @@ if ( hasSymbols ) { }); } -obj = new Foo(); -props = nonEnumerablePropertiesIn( obj ); - +var obj = new Foo(); +var props = nonEnumerablePropertiesIn( obj ); console.log( props ); // => [ 'b', 'beep', ... ] diff --git a/properties-in/README.md b/properties-in/README.md index c3d60f5c..85757295 100644 --- a/properties-in/README.md +++ b/properties-in/README.md @@ -60,11 +60,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var propertiesIn = require( '@stdlib/utils/properties-in' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -79,11 +75,9 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'foo' ) ] = 'bar'; } -obj = new Foo(); -props = propertiesIn( obj ); - -console.log( props ); -// e.g., => [ 'a', 'foo', ... ] +var obj = new Foo(); +var props = propertiesIn( obj ); +// returns [ 'a', 'foo', ... ] ``` diff --git a/properties-in/examples/index.js b/properties-in/examples/index.js index ce42a0fc..3c09e0f5 100644 --- a/properties-in/examples/index.js +++ b/properties-in/examples/index.js @@ -22,11 +22,7 @@ var hasSymbolSupport = require( '@stdlib/assert/has-symbol-support' ); var Symbol = require( '@stdlib/symbol/ctor' ); var propertiesIn = require( './../lib' ); -var hasSymbols; -var props; -var obj; - -hasSymbols = hasSymbolSupport(); +var hasSymbols = hasSymbolSupport(); function Foo() { this.a = 'b'; @@ -41,8 +37,7 @@ if ( hasSymbols ) { Foo.prototype[ Symbol( 'foo' ) ] = 'bar'; } -obj = new Foo(); -props = propertiesIn( obj ); - +var obj = new Foo(); +var props = propertiesIn( obj ); console.log( props ); // => [ 'a', 'foo', ... ]