File tree Expand file tree Collapse file tree 3 files changed +36
-26
lines changed
eslint/rules/jsdoc-ordered-list-marker-style/lib
assert/is-enumerable-property/examples Expand file tree Collapse file tree 3 files changed +36
-26
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,29 @@ var DOPTS = {
3737} ;
3838
3939
40+ // FUNCTIONS //
41+
42+ /**
43+ * Copies AST node location info.
44+ *
45+ * @private
46+ * @param {Object } loc - AST node location
47+ * @returns {Object } copied location info
48+ */
49+ function copyLocationInfo ( loc ) {
50+ return {
51+ 'start' : {
52+ 'line' : loc . start . line ,
53+ 'column' : loc . start . column
54+ } ,
55+ 'end' : {
56+ 'line' : loc . end . line ,
57+ 'column' : loc . end . column
58+ }
59+ } ;
60+ }
61+
62+
4063// MAIN //
4164
4265/**
@@ -117,26 +140,6 @@ function main( context ) {
117140 }
118141 }
119142
120- /**
121- * Copies AST node location info.
122- *
123- * @private
124- * @param {Object } loc - AST node location
125- * @returns {Object } copied location info
126- */
127- function copyLocationInfo ( loc ) {
128- return {
129- 'start' : {
130- 'line' : loc . start . line ,
131- 'column' : loc . start . column
132- } ,
133- 'end' : {
134- 'line' : loc . end . line ,
135- 'column' : loc . end . column
136- }
137- } ;
138- }
139-
140143 /**
141144 * Reports an error message.
142145 *
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ var debug = logger( 'lint:license-header-glob:sync' );
5656* };
5757*
5858* var errs = lint( opts );
59- * // returns [...]
59+ * // e.g., returns [...]
6060*/
6161function lint ( options ) {
6262 var names ;
Original file line number Diff line number Diff line change 1616* limitations under the License.
1717*/
1818
19- /* eslint-disable object-curly-newline */
20-
2119'use strict' ;
2220
2321var isEnumerableProperty = require ( './../lib' ) ;
2422
25- var bool = isEnumerableProperty ( { 'a' : 'b' } , 'a' ) ;
23+ var obj = {
24+ 'a' : 'b'
25+ } ;
26+ var bool = isEnumerableProperty ( obj , 'a' ) ;
2627console . log ( bool ) ;
2728// => true
2829
@@ -50,10 +51,16 @@ bool = isEnumerableProperty( void 0, 'a' );
5051console . log ( bool ) ;
5152// => false
5253
53- bool = isEnumerableProperty ( { 'null' : false } , null ) ;
54+ obj = {
55+ 'null' : false
56+ } ;
57+ bool = isEnumerableProperty ( obj , null ) ;
5458console . log ( bool ) ;
5559// => true
5660
57- bool = isEnumerableProperty ( { '[object Object]' : false } , { } ) ;
61+ obj = {
62+ '[object Object]' : false
63+ } ;
64+ bool = isEnumerableProperty ( obj , { } ) ;
5865console . log ( bool ) ;
5966// => true
You can’t perform that action at this time.
0 commit comments