source: imaps-frontend/node_modules/es-object-atoms/README.md

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[d565449]1# es-object-atoms <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
10ES Object-related atoms: Object, ToObject, RequireObjectCoercible.
11
12## Example
13
14```js
15const assert = require('assert');
16
17const $Object = require('es-object-atoms');
18const ToObject = require('es-object-atoms/ToObject');
19const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
20
21assert.equal($Object, Object);
22assert.throws(() => ToObject(null), TypeError);
23assert.throws(() => ToObject(undefined), TypeError);
24assert.throws(() => RequireObjectCoercible(null), TypeError);
25assert.throws(() => RequireObjectCoercible(undefined), TypeError);
26
27assert.deepEqual(RequireObjectCoercible(true), true);
28assert.deepEqual(ToObject(true), Object(true));
29
30const obj = {};
31assert.equal(RequireObjectCoercible(obj), obj);
32assert.equal(ToObject(obj), obj);
33```
34
35## Tests
36Simply clone the repo, `npm install`, and run `npm test`
37
38## Security
39
40Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
41
42[package-url]: https://npmjs.org/package/es-object-atoms
43[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg
44[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg
45[deps-url]: https://david-dm.org/ljharb/es-object-atoms
46[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg
47[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies
48[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true
49[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg
50[license-url]: LICENSE
51[downloads-image]: https://img.shields.io/npm/dm/es-object.svg
52[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms
53[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg
54[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/
55[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms
56[actions-url]: https://github.com/ljharb/es-object-atoms/actions
Note: See TracBrowser for help on using the repository browser.