source: imaps-frontend/node_modules/object.fromentries/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.2 KB
Line 
1# object.fromentries <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][deps-svg]][deps-url]
6[![dev dependency status][dev-deps-svg]][dev-deps-url]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][npm-badge-png]][package-url]
11
12An ES spec-proposal-compliant `Object.fromEntries` shim. Invoke its "shim" method to shim `Object.fromEntries` if it is unavailable or noncompliant.
13
14This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [proposed spec](https://tc39.github.io/proposal-object-from-entries/).
15
16Most common usage:
17```js
18var assert = require('assert');
19var fromEntries = require('object.fromentries');
20
21var obj = { a: 1, b: 2, c: 3 };
22var actual = fromEntries(Object.entries(obj));
23
24assert.deepEqual(obj, actual);
25
26if (!Object.fromEntries) {
27 fromEntries.shim();
28}
29
30assert.deepEqual(Object.fromEntries(Object.entries(obj)), obj);
31```
32
33## Tests
34Simply clone the repo, `npm install`, and run `npm test`
35
36[package-url]: https://npmjs.com/package/object.fromentries
37[npm-version-svg]: https://versionbadg.es/es-shims/Object.fromEntries.svg
38[deps-svg]: https://david-dm.org/es-shims/Object.fromEntries.svg
39[deps-url]: https://david-dm.org/es-shims/Object.fromEntries
40[dev-deps-svg]: https://david-dm.org/es-shims/Object.fromEntries/dev-status.svg
41[dev-deps-url]: https://david-dm.org/es-shims/Object.fromEntries#info=devDependencies
42[npm-badge-png]: https://nodei.co/npm/object.fromentries.png?downloads=true&stars=true
43[license-image]: https://img.shields.io/npm/l/object.fromentries.svg
44[license-url]: LICENSE
45[downloads-image]: https://img.shields.io/npm/dm/object.fromentries.svg
46[downloads-url]: https://npm-stat.com/charts.html?package=object.fromentries
47[codecov-image]: https://codecov.io/gh/es-shims/Object.fromEntries/branch/main/graphs/badge.svg
48[codecov-url]: https://app.codecov.io/gh/es-shims/Object.fromEntries/
49[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.fromEntries
50[actions-url]: https://github.com/es-shims/Object.fromEntries/actions
Note: See TracBrowser for help on using the repository browser.