Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Mar 1, 2024
1 parent 23955b6 commit 6cf1981
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/.keepalive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-03-01T00:35:15.754Z
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ branches.md
.postinstall.json
Makefile

# Ignore `binding.gyp` file to avoid compilation of native addon when installing package:
# Ignore files to avoid compilation of native addon when installing package:
binding.gyp
include.gypi

# Directories #
###############
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
#
# Contributors listed in alphabetical order.

Aditya Sapra <110766802+adityacodes30@users.noreply.github.com>
AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
Ali Salesi <ali_sal1381@yahoo.com>
Amit Jimiwal <amitjimiwal45@gmail.com>
Athan Reines <kgryte@gmail.com>
Brendan Graetz <bguiz@users.noreply.github.com>
Bruno Fenzl <brunofenzl@gmail.com>
Chinmay J <86140365+JawHawk@users.noreply.github.com>
Christopher Dambamuromo <chridam@gmail.com>
Dan Rose <danoftheroses@gmail.com>
Daniel Killenberger <daniel.killenberger@gmail.com>
Dominik Moritz <domoritz@gmail.com>
Dorrin Sotoudeh <dorrinsotoudeh123@gmail.com>
Frank Kovacs <fran70kk@gmail.com>
GUNJ JOSHI <gunjjoshi8372@gmail.com>
Golden <103646877+AuenKr@users.noreply.github.com>
Harshita Kalani <harshitakalani02@gmail.com>
James Gelok <jdgelok@gmail.com>
Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
Expand All @@ -21,21 +26,31 @@ Joey Reed <joeyrreed@gmail.com>
Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com>
Joris Labie <joris.labie1@gmail.com>
Justin Dennison <justin1dennison@gmail.com>
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
Khaldon <kahmd1444@gmail.com>
Marcus Fantham <mfantham@users.noreply.github.com>
Matt Cochrane <matthew.cochrane.eng@gmail.com>
Mihir Pandit <129577900+MSP20086@users.noreply.github.com>
Milan Raj <rajsite@users.noreply.github.com>
Momtchil Momtchev <momtchil@momtchev.com>
Naresh Jagadeesan <naresh.naresh000@gmail.com>
Nithin Katta <88046362+nithinkatta@users.noreply.github.com>
Ognjen Jevremović <ognjenjevremovic@users.noreply.github.com>
Philipp Burckhardt <pburckhardt@outlook.com>
Prajwal Kulkarni <prajwalkulkarni76@gmail.com>
Pranav Goswami <goswami.4@iitj.ac.in>
Praneki <97080887+PraneGIT@users.noreply.github.com>
Pratik <97464067+Pratik772846@users.noreply.github.com>
Ricky Reusser <rsreusser@gmail.com>
Robert Gislason <gztown2216@yahoo.com>
Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com>
Rutam <138517416+performant23@users.noreply.github.com>
Ryan Seal <splrk@users.noreply.github.com>
Seyyed Parsa Neshaei <spneshaei@users.noreply.github.com>
Shraddheya Shendre <shendreshraddheya@gmail.com>
Shubham <shubh622005@gmail.com>
Snehil Shah <130062020+Snehil-Shah@users.noreply.github.com>
Spandan Barve <114365550+marsian83@users.noreply.github.com>
Stephannie Jiménez Gacha <steff456@hotmail.com>
Yernar Yergaziyev <yernar.yergaziyev@erg.kz>
orimiles5 <97595296+orimiles5@users.noreply.github.com>
Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,6 @@ For more information on the project, filing bug reports and feature requests, an

---

## License

See [LICENSE][stdlib-license].


## Copyright

Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
Expand All @@ -195,8 +190,8 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
[npm-image]: http://img.shields.io/npm/v/@stdlib/utils-define-nonenumerable-read-only-accessor.svg
[npm-url]: https://npmjs.org/package/@stdlib/utils-define-nonenumerable-read-only-accessor

[test-image]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/actions/workflows/test.yml/badge.svg?branch=v0.2.2
[test-url]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/actions/workflows/test.yml?query=branch:v0.2.2
[test-image]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/actions/workflows/test.yml/badge.svg?branch=main
[test-url]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/actions/workflows/test.yml?query=branch:main

[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/utils-define-nonenumerable-read-only-accessor/main.svg
[coverage-url]: https://codecov.io/github/stdlib-js/utils-define-nonenumerable-read-only-accessor?branch=main
Expand Down Expand Up @@ -226,8 +221,6 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
[esm-readme]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/blob/esm/README.md
[branches-url]: https://github.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/blob/main/branches.md

[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/utils-define-nonenumerable-read-only-accessor/main/LICENSE

[@stdlib/utils/define-property]: https://github.com/stdlib-js/utils-define-property

<!-- <related-links> -->
Expand Down
38 changes: 34 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
"use strict";var n=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var t=n(function(l,s){
var i=require('@stdlib/utils-define-property/dist');function u(r,e,a){i(r,e,{configurable:!1,enumerable:!1,get:a})}s.exports=u
});var o=t();module.exports=o;
/** @license Apache-2.0 */
//# sourceMappingURL=index.js.map

'use strict';

/**
* Define a non-enumerable read-only accessor.
*
* @module @stdlib/utils-define-nonenumerable-read-only-accessor
*
* @example
* var setNonEnumerableReadOnlyAccessor = require( '@stdlib/utils-define-nonenumerable-read-only-accessor' );
*
* function getter() {
* return 'bar';
* }
*
* var obj = {};
*
* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );
*
* try {
* obj.foo = 'boop';
* } catch ( err ) {
* console.error( err.message );
* }
*/

// MODULES //

var main = require( './main.js' );


// EXPORTS //

module.exports = main;
61 changes: 61 additions & 0 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// MODULES //

var defineProperty = require( '@stdlib/utils-define-property' );


// MAIN //

/**
* Defines a non-enumerable read-only accessor.
*
* @param {Object} obj - object on which to define the property
* @param {(string|symbol)} prop - property name
* @param {Function} getter - accessor
*
* @example
* function getter() {
* return 'bar';
* }
*
* var obj = {};
*
* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );
*
* try {
* obj.foo = 'boop';
* } catch ( err ) {
* console.error( err.message );
* }
*/
function setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length
defineProperty( obj, prop, {
'configurable': false,
'enumerable': false,
'get': getter
});
}


// EXPORTS //

module.exports = setNonEnumerableReadOnlyAccessor;
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@
},
"dependencies": {
"@stdlib/types": "^0.3.2",
"@stdlib/utils-define-property": "^0.2.1"
"@stdlib/utils-define-property": "^0.2.3"
},
"devDependencies": {
"@stdlib/assert-is-string": "^0.2.0",
"@stdlib/string-from-code-point": "^0.2.0",
"@stdlib/utils-keys": "^0.2.0",
"@stdlib/assert-is-string": "^0.2.1",
"@stdlib/string-from-code-point": "^0.2.1",
"@stdlib/utils-keys": "^0.2.1",
"tape": "git+https://github.com/kgryte/tape.git#fix/globby",
"istanbul": "^0.4.1",
"tap-min": "git+https://github.com/Planeshifter/tap-min.git",
"@stdlib/bench-harness": "^0.2.0"
"@stdlib/bench-harness": "^0.2.1"
},
"engines": {
"node": ">=0.10.0",
Expand Down

0 comments on commit 6cf1981

Please sign in to comment.