All Projects → es-shims → Object.fromEntries

es-shims / Object.fromEntries

Licence: MIT license
Official ES spec-compliant polyfill for Object.fromEntries

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Object.fromEntries

fromentries
Object.fromEntries() ponyfill (in 6 lines)
Stars: ✭ 62 (+87.88%)
Mutual labels:  object, fromentries
DataTypes
Built-in data types
Stars: ✭ 34 (+3.03%)
Mutual labels:  object
object-visit
Call the given method on each value in the given object.
Stars: ✭ 19 (-42.42%)
Mutual labels:  object
php-helpers
An extensive set of PHP helper functions and classes.
Stars: ✭ 27 (-18.18%)
Mutual labels:  object
omit-empty
Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.
Stars: ✭ 71 (+115.15%)
Mutual labels:  object
lazy-cache
Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
Stars: ✭ 51 (+54.55%)
Mutual labels:  object
has-value
Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
Stars: ✭ 27 (-18.18%)
Mutual labels:  object
python-pyfields
Define fields in python classes. Easily.
Stars: ✭ 39 (+18.18%)
Mutual labels:  object
SmartReplace
Unity plug-in for replacing scene objects while keeping their references.
Stars: ✭ 50 (+51.52%)
Mutual labels:  object
js-explorer
Find the method you need without digging through the docs, directly on the command line!
Stars: ✭ 287 (+769.7%)
Mutual labels:  object
obfc.js
Object Based Flow Charts(obfc): Draws SVG-based flow charts by creating objects in your web pages.
Stars: ✭ 19 (-42.42%)
Mutual labels:  object
DTE
Generate C# class from database table
Stars: ✭ 26 (-21.21%)
Mutual labels:  object
object.omit
Return a copy of an object without the given keys.
Stars: ✭ 79 (+139.39%)
Mutual labels:  object
reach-schema
Functional schema-driven JavaScript object validation library.
Stars: ✭ 34 (+3.03%)
Mutual labels:  object
timeline
Timeline - A photo organizer
Stars: ✭ 39 (+18.18%)
Mutual labels:  object
js-deep-sort-object
Simple module to sort objects recursively by its keys
Stars: ✭ 19 (-42.42%)
Mutual labels:  object
obman
[cvpr19] Hands+Objects synthetic dataset, instructions to download and code to load the dataset
Stars: ✭ 120 (+263.64%)
Mutual labels:  object
SoftUni-Software-Engineering
SoftUni- Software Engineering
Stars: ✭ 47 (+42.42%)
Mutual labels:  object
obj-to-table
Create a table from an array of objects
Stars: ✭ 15 (-54.55%)
Mutual labels:  object
is-extendable
Answers the question: "can this value have keys?". Returns true if a value is any of the object types: array, regexp, plain object, function or date. Useful for determining if a value is an object that can be extended.
Stars: ✭ 19 (-42.42%)
Mutual labels:  object

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].