Skip to content

Commit e52f697

Browse files
committed
Auto-generated commit
1 parent 9e81ea4 commit e52f697

File tree

8 files changed

+130
-20
lines changed

8 files changed

+130
-20
lines changed

.editorconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ indent_size = 2
148148
indent_style = space
149149
indent_size = 2
150150

151-
# Set properties for `tslint.json` files:
152-
[tslint.json]
153-
indent_style = space
154-
indent_size = 2
155-
156151
# Set properties for `tsconfig.json` files:
157152
[tsconfig.json]
158153
indent_style = space

.github/.keepalive

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-12-01T03:16:00.482Z

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
# For all dependencies, check in all *.js files if they are still used; if not, remove them:
120120
jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do
121121
dep=$(echo "$dep" | xargs)
122-
if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
122+
if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
123123
jq --indent 2 "del(.dependencies[\"$dep\"])" ./package.json > ./package.json.tmp
124124
mv ./package.json.tmp ./package.json
125125
fi
@@ -129,7 +129,7 @@ jobs:
129129
continue
130130
fi
131131
dep=$(echo "$dep" | xargs)
132-
if ! grep -q "$dep" lib/** && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
132+
if ! find lib -name "*.js" -exec grep -q "$dep" {} + && ! grep -q -s "$dep" manifest.json && ! grep -q -s "$dep" include.gypi; then
133133
jq --indent 2 "del(.devDependencies[\"$dep\"])" ./package.json > ./package.json.tmp
134134
mv ./package.json.tmp ./package.json
135135
fi

CONTRIBUTORS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Brendan Graetz <bguiz@users.noreply.github.com>
99
Bruno Fenzl <brunofenzl@gmail.com>
1010
Christopher Dambamuromo <chridam@gmail.com>
1111
Dan Rose <danoftheroses@gmail.com>
12+
Daniel Killenberger <daniel.killenberger@gmail.com>
1213
Dominik Moritz <domoritz@gmail.com>
1314
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
1415
Frank Kovacs <fran70kk@gmail.com>
@@ -29,6 +30,7 @@ Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
2930
Philipp Burckhardt <pburckhardt@outlook.com>
3031
Pranav Goswami <goswami.4@iitj.ac.in>
3132
Ricky Reusser <rsreusser@gmail.com>
33+
Robert Gislason <gztown2216@yahoo.com>
3234
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
3335
Ryan Seal <splrk@users.noreply.github.com>
3436
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
@@ -37,4 +39,3 @@ Stephannie Jiménez Gacha <steff456@hotmail.com>
3739
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
3840
orimiles5 <97595296+orimiles5@users.noreply.github.com>
3941
rei2hu <reimu@reimu.ws>
40-
Robert Gislason <gztown2216@yahoo.com>

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ For more information on the project, filing bug reports and feature requests, an
182182

183183
---
184184

185-
## License
186-
187-
See [LICENSE][stdlib-license].
188-
189-
190185
## Copyright
191186

192187
Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
@@ -230,8 +225,6 @@ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
230225
[esm-url]: https://github.com/stdlib-js/utils-nonenumerable-property-names-in/tree/esm
231226
[branches-url]: https://github.com/stdlib-js/utils-nonenumerable-property-names-in/blob/main/branches.md
232227

233-
[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-nonenumerable-property-names-in/main/LICENSE
234-
235228
[ecma-262-for-in]: https://262.ecma-international.org/5.1/#sec-12.6.4
236229

237230
<!-- <related-links> -->

dist/index.js

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
1-
"use strict";var v=function(t,r){return function(){return r||t((r={exports:{}}).exports,r),r.exports}};var s=v(function(b,u){
2-
var p=require('@stdlib/utils-property-names/dist'),m=require('@stdlib/utils-get-prototype-of/dist'),c=require('@stdlib/assert-is-nonenumerable-property/dist'),f=require('@stdlib/assert-has-own-property/dist'),q=require('@stdlib/object-ctor/dist');function h(t){var r,n,e,o,a,i;if(t==null)return[];e=q(t),r=[],n={};do{for(o=p(e),i=0;i<o.length;i++)a=o[i],f(n,a)===!1&&c(e,a)&&r.push(a),n[a]=!0;e=m(e)}while(e);return r}u.exports=h
3-
});var l=s();module.exports=l;
41
/** @license Apache-2.0 */
5-
//# sourceMappingURL=index.js.map
2+
3+
'use strict';
4+
5+
/**
6+
* Return an array of an object's own and inherited non-enumerable property names.
7+
*
8+
* @module @stdlib/utils-nonenumerable-property-names-in
9+
*
10+
* @example
11+
* var defineProperty = require( '@stdlib/utils-define-property' );
12+
* var nonEnumerablePropertyNamesIn = require( '@stdlib/utils-nonenumerable-property-names-in' );
13+
*
14+
* var obj = {};
15+
*
16+
* defineProperty( obj, 'beep', {
17+
* 'configurable': false,
18+
* 'enumerable': false,
19+
* 'writable': false,
20+
* 'value': 'boop'
21+
* });
22+
*
23+
* var keys = nonEnumerablePropertyNamesIn( obj );
24+
* // e.g., returns [ 'beep', ... ]
25+
*/
26+
27+
// MODULES //
28+
29+
var main = require( './main.js' );
30+
31+
32+
// EXPORTS //
33+
34+
module.exports = main;

dist/main.js

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2018 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
var getOwnPropertyNames = require( '@stdlib/utils-property-names' );
24+
var getPrototypeOf = require( '@stdlib/utils-get-prototype-of' );
25+
var isNonEnumerableProperty = require( '@stdlib/assert-is-nonenumerable-property' );
26+
var hasOwnProp = require( '@stdlib/assert-has-own-property' );
27+
var Object = require( '@stdlib/object-ctor' );
28+
29+
30+
// MAIN //
31+
32+
/**
33+
* Returns an array of an object's own and inherited non-enumerable property names.
34+
*
35+
* @param {*} value - input object
36+
* @returns {Array} a list of own and inherited non-enumerable property names
37+
*
38+
* @example
39+
* var defineProperty = require( '@stdlib/utils-define-property' );
40+
*
41+
* var obj = {};
42+
*
43+
* defineProperty( obj, 'beep', {
44+
* 'configurable': false,
45+
* 'enumerable': false,
46+
* 'writable': false,
47+
* 'value': 'boop'
48+
* });
49+
*
50+
* var keys = nonEnumerablePropertyNamesIn( obj );
51+
* // e.g., returns [ 'beep', ... ]
52+
*/
53+
function nonEnumerablePropertyNamesIn( value ) { // eslint-disable-line id-length
54+
var names;
55+
var cache;
56+
var obj;
57+
var tmp;
58+
var k;
59+
var i;
60+
61+
if ( value === null || value === void 0 ) {
62+
return [];
63+
}
64+
// Cast the value to an object:
65+
obj = Object( value );
66+
67+
// Walk the prototype chain collecting non-enumerable property names...
68+
names = [];
69+
cache = {};
70+
do {
71+
tmp = getOwnPropertyNames( obj );
72+
for ( i = 0; i < tmp.length; i++ ) {
73+
k = tmp[ i ];
74+
if (
75+
hasOwnProp( cache, k ) === false &&
76+
isNonEnumerableProperty( obj, k )
77+
) {
78+
names.push( k );
79+
}
80+
cache[ k ] = true;
81+
}
82+
obj = getPrototypeOf( obj );
83+
} while ( obj );
84+
85+
return names;
86+
}
87+
88+
89+
// EXPORTS //
90+
91+
module.exports = nonEnumerablePropertyNamesIn;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"devDependencies": {
4747
"@stdlib/assert-is-array": "^0.1.1",
48-
"@stdlib/bench": "^0.2.0",
48+
"@stdlib/bench": "^0.2.1",
4949
"@stdlib/random-base-randu": "^0.1.0",
5050
"@stdlib/utils-define-property": "^0.1.1",
5151
"@stdlib/utils-index-of": "^0.1.0",

0 commit comments

Comments
 (0)