object.fromentries
ES proposal-spec-compliant Object.fromEntries shim.
Last updated 2 years ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install object.fromentries 
SYNC missed versions from official npm registry.

object.fromentries Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES spec-proposal-compliant Object.fromEntries shim. Invoke its "shim" method to shim Object.fromEntries if it is unavailable or noncompliant.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the proposed spec.

Most common usage:

var assert = require('assert');
var fromEntries = require('object.fromentries');

var obj = { a: 1, b: 2, c: 3 };
var actual = fromEntries(Object.entries(obj));

assert.deepEqual(obj, actual);

if (!Object.fromEntries) {
	fromEntries.shim();
}

assert.deepEqual(Object.fromEntries(Object.entries(obj)), obj);

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 2.0.7                                ...           latest (a year ago)

10 Versions

  • 2.0.7                                ...           a year ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           3 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           7 years ago
  • 0.0.1-security                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 6
Last Month 0
Dependencies (3)
Dev Dependencies (10)

Copyright 2013 - present © cnpmjs.org | Home |