Components and utilities for the modern web
Javascript Utilities


objectMap iterates over an object and returns an array. It uses under the hood to return the array.


First, make sure you install Splendid UI.

npm install splendid-ui

Then import objectMap into your project.

import { objectMap } from 'splendid-ui/utils'


objectMap takes in two arguments:

  • the object to loop over
  • the callback to execute
const array = objectMap(object, ({ key, value }) => {
  // Do what you want

That’s it!

Like what you're seeing?

I'm on a quest to make web development extremely easy — by building components and utilities that will help all of us build better apps at a much faster pace.

I'd like to send you an update when I release something new in Splendid UI. If you want to be updated, please leave your email address below.

Powered by Buttondown