npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cutticat/objects

v3.4.3

Published

CuttiCat library with miscellaneous utilities for working with objects

Readme

@cutticat/objects

Object utility library.

Contents

Overview

The library provides checks (isPlainObject, isEmpty), object transformations (mapKeys, mapValues, mapEntries), merging (deepMerge), and deep comparison (deepEqual). Uses types from @cutticat/types.

Installation

pnpm i @cutticat/objects

Quick start

import {
  isPlainObject,
  isEmpty,
  mapKeys,
  mapValues,
  mapEntries,
  deepMerge,
  deepEqual,
  pick,
  omit,
  pickBy,
  omitBy,
  compact,
  deepCompact,
} from "@cutticat/objects"

// Checks
isPlainObject({ a: 1 })   // true
isEmpty("")                // true

// Transformations
mapKeys({ foo: 1 }, k => k.toUpperCase())  // { FOO: 1 }
mapValues({ a: 1, b: 2 }, v => (v as number) * 2)  // { a: 2, b: 4 }
deepMerge([{ a: 1, b: { x: 1 } }, { b: { y: 2 } }])  // { a: 1, b: { x: 1, y: 2 } }
deepEqual({ a: 1 }, { a: 1 })                        // true
deepEqual({ a: 1 }, { a: 2 })                        // false

// Selection and filtering
pick({ a: 1, b: 2, c: 3 }, ["a", "c"])  // { a: 1, c: 3 }
omit({ a: 1, b: 2, c: 3 }, ["b"])       // { a: 1, c: 3 }
compact({ a: 1, b: null, c: undefined })  // { a: 1 }
deepCompact({ a: { b: undefined, c: 1 } })  // { a: { c: 1 } }

API

Checks

  • isPlainObject(value) — checks whether the value is a plain object (excludes Date, RegExp, arrays)
  • isEmpty(value, options?) — checks emptiness (strings, arrays, objects; recursively — empty only if all elements are empty)
  • IsEmptyOptions — options: ignore, count, noRecursive

Functional

  • mapKeys(object, callback) — transforms keys
  • mapValues(object, callback) — transforms values
  • mapEntries(object, callback) — transforms key-value pairs
  • deepMerge(objects, options?) — recursively merges objects from an array objects (left to right, last wins); null/undefined entries in the array are skipped
    • by default arrays in values are replaced entirely (as in v2)
    • options.arrayMergePolicy: "merge" — merge arrays by index (objects in elements — recursively; primitives — right operand wins)
    • for tuples of 2–4 objects, the result type is inferred as an intersection (T1 & T2 & …)
    • types: DeepMergeOptions, ArrayDeepMergePolicy
  • deepEqual(a, b, options?) — recursively compares values; plain objects and arrays — by content, Date — by getTime(), other objects — by reference only
    • options.nullAsUndefinednull and undefined are equal
    • options.missingKeyAsUndefined — a missing key in a plain object equals an explicit undefined
    • type: DeepEqualOptions
  • pick(object, keys) — selects specified keys
  • omit(object, keys) — excludes specified keys
  • pickBy(object, predicate) — selects pairs matching the predicate
  • omitBy(object, predicate) — excludes pairs matching the predicate
  • compact(object) — removes null and undefined only at the top level of the object
  • deepCompact(object) — recursively removes null and undefined in plain objects; in arrays, drops null/undefined elements

Documentation

Further documentation:

Full API documentation is available in JSDoc comments. Use IDE autocomplete to browse.

Requirements

  • Node.js >= 22.0.0
  • pnpm >= 10.17.0
  • TypeScript >= 5.9.0