Socket
Socket
Sign inDemoInstall

object.fromentries

Package Overview
Dependencies
60
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

object.fromentries

ES proposal-spec-compliant Object.fromEntries shim.

    2.0.7latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
17,438,382
decreased by-13.81%

Weekly downloads

Changelog

Source

v2.0.7 - 2023-08-28

Commits

  • [Deps] update define-properties, es-abstract dbf1467
  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, aud, tape 495556f

Readme

Source

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

Keywords

FAQs

Last updated on 29 Aug 2023

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc