source: imaps-frontend/node_modules/set-proto/README.md@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[79a0317]1# set-proto <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![License][license-image]][license-url]
6[![Downloads][downloads-image]][downloads-url]
7
8[![npm badge][npm-badge-png]][package-url]
9
10Robustly set the [[Prototype]] of an object. Uses the best available method.
11
12## Getting started
13
14```sh
15npm install --save set-proto
16```
17
18## Usage/Examples
19
20```js
21const assert = require('assert');
22const setProto = require('set-proto');
23
24const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' };
25const b = { c: 3 };
26
27assert.ok(!('c' in a));
28
29setProto(a, b);
30
31assert.ok('c' in a);
32```
33
34## Tests
35
36Clone the repo, `npm install`, and run `npm test`
37
38[package-url]: https://npmjs.org/package/set-proto
39[npm-version-svg]: https://versionbadg.es/ljharb/set-proto.svg
40[deps-svg]: https://david-dm.org/ljharb/set-proto.svg
41[deps-url]: https://david-dm.org/ljharb/set-proto
42[dev-deps-svg]: https://david-dm.org/ljharb/set-proto/dev-status.svg
43[dev-deps-url]: https://david-dm.org/ljharb/set-proto#info=devDependencies
44[npm-badge-png]: https://nodei.co/npm/set-proto.png?downloads=true&stars=true
45[license-image]: https://img.shields.io/npm/l/set-proto.svg
46[license-url]: LICENSE
47[downloads-image]: https://img.shields.io/npm/dm/set-proto.svg
48[downloads-url]: https://npm-stat.com/charts.html?package=set-proto
49[codecov-image]: https://codecov.io/gh/ljharb/set-proto/branch/main/graphs/badge.svg
50[codecov-url]: https://app.codecov.io/gh/ljharb/set-proto/
51[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/set-proto
52[actions-url]: https://github.com/ljharb/set-proto/actions
Note: See TracBrowser for help on using the repository browser.