
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
fromentries
Advanced tools
npm install fromentries
Existing polyfill packages (like
object.fromentries)
pull in a bunch of dependencies and adds over 8
KB to the browser bundle size. This allows them to work in ES3 environments
like IE6, but it's also overkill; almost no one supports IE6 anymore.
I'd rather not ship tons of extra code to website visitors. A polyfill for this
feature can be implemented in a few short lines of code using modern language
features. That's what fromentries (this package) does.
This means that fromentries only works in evergreen browsers like:
It does not work in browsers like IE11 and older (unless you transpile it first).
const fromEntries = require('fromentries')
const map = new Map([ [ 'a', 1 ], [ 'b', 2 ], [ 'c', 3 ] ])
const obj = fromEntries(map)
constole.log(obj) // { a: 1, b: 2, c: 3 }
const searchParams = new URLSearchParams('foo=bar&baz=qux')
const obj2 = fromEntries(searchParams)
console.log(obj2) // { foo: 'bar', 'baz': 'qux' }
A ponyfill is almost the same as a polyfill, but not quite. Instead of patching functionality for older browsers, a ponyfill provides that functionality as a standalone module you can use.
Read more at PonyFoo.
MIT. Copyright (c) Feross Aboukhadijeh.
The 'object.fromentries' package is another polyfill for the Object.fromEntries method. It provides similar functionality to 'fromentries' by converting arrays of key-value pairs or Map objects into plain JavaScript objects. Both packages serve the same purpose, but 'object.fromentries' might have different implementation details or additional features.
Lodash is a utility library that provides a wide range of functions for manipulating arrays, objects, and other data types. While it is not a direct polyfill for Object.fromEntries, Lodash offers similar functionality through its '_.fromPairs' method, which converts arrays of key-value pairs into objects. Lodash is more comprehensive and includes many other utility functions beyond just converting pairs to objects.
FAQs
Object.fromEntries() ponyfill (in 6 lines)
The npm package fromentries receives a total of 0 weekly downloads. As such, fromentries popularity was classified as not popular.
We found that fromentries demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.