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

pickfy

v1.0.1

Published

Pick and omit object properties with utilities for arrays, case conversion, and more (TS, ESM+CJS).

Readme

pickfy

Pick and omit object properties with utilities for arrays, case conversion, and more.

📦 Install

npm install pickfy

or with yarn:

yarn add pickfy

🚀 Usage Examples

🔹 pick

Extract specific keys from an object.

import { pick } from "pickfy";

const user = { id: 1, name: "Ana", email: "[email protected]" };

console.log(pick(user, ["id", "name"] as const));
// → { id: 1, name: "Ana" }

🔹 pickMany

Pick keys from an array of objects.

import { pickMany } from "pickfy";

const users = [
  { id: 1, name: "Ana", email: "[email protected]" },
  { id: 2, name: "Bia", email: "[email protected]" }
];

console.log(pickMany(users, ["id"] as const));
// → [ { id: 1 }, { id: 2 } ]

🔹 pickRename

Pick and rename keys.

import { pickRename } from "pickfy";

const user = { id: 1, name: "Ana" };

console.log(pickRename(user, { userId: "id", fullName: "name" }));
// → { userId: 1, fullName: "Ana" }

🔹 pickPaths

Pick nested keys with dot-notation.

import { pickPaths } from "pickfy";

const user = { profile: { city: "SP", age: 30 } };

console.log(pickPaths(user, ["profile.city", "profile.age"]));
// → { "profile.city": "SP", "profile.age": 30 }

🔹 pickWithDefaults

Pick keys, applying default values if missing.

import { pickWithDefaults } from "pickfy";

const user = { name: "Ana" };

console.log(
  pickWithDefaults(user, ["nickname", "name"] as const, { nickname: "anon" })
);
// → { nickname: "anon", name: "Ana" }

🔹 pickWhere

Pick keys from array elements matching a predicate.

import { pickWhere } from "pickfy";

const users = [
  { id: 1, name: "Ana", profile: { age: 30 } },
  { id: 2, name: "Bia", profile: { age: 25 } }
];

console.log(pickWhere(users, ["id", "name"] as const, u => u.profile.age > 28));
// → [ { id: 1, name: "Ana" } ]

🔹 omit

Remove specific keys from an object.

import { omit } from "pickfy";

const user = { id: 1, name: "Ana", email: "[email protected]" };

console.log(omit(user, ["email"] as const));
// → { id: 1, name: "Ana" }

🔹 omitMany

Omit keys from multiple objects.

import { omitMany } from "pickfy";

const users = [
  { id: 1, name: "Ana", email: "[email protected]" },
  { id: 2, name: "Bia", email: "[email protected]" }
];

console.log(omitMany(users, ["email"] as const));
// → [ { id: 1, name: "Ana" }, { id: 2, name: "Bia" } ]

🔹 omitWhere

Omit keys only if predicate matches.

import { omitWhere } from "pickfy";

const users = [
  { id: 1, name: "Ana", active: true },
  { id: 2, name: "Bia", active: false }
];

console.log(omitWhere(users, ["active"] as const, u => !u.active));
// → [ { id: 1, name: "Ana", active: true }, { id: 2, name: "Bia" } ]

🔹 omitNullish

Remove keys with null or undefined.

import { omitNullish } from "pickfy";

const obj = { a: 1, b: null, c: undefined };

console.log(omitNullish(obj));
// → { a: 1 }

🔹 omitPaths

Remove nested keys by dot-notation.

import { omitPaths } from "pickfy";

const user = { profile: { city: "SP", age: 30 } };

console.log(omitPaths(user, ["profile.age"]));
// → { profile: { city: "SP" } }

🔹 convertCase

Convert key names between cases.

import { convertCase } from "pickfy";

console.log(convertCase("user_name", "camel"));
// → "userName"

console.log(convertCase("UserId", "snake"));
// → "user_id"

console.log(convertCase("profile.cityName", "kebab"));
// → "profile-city-name"

🔹 tokenize

Split identifiers into normalized tokens.

import { tokenize } from "pickfy";

console.log(tokenize("APIResponse"));
// → ["API", "Response"]

console.log(tokenize("user_name"));
// → ["user", "name"]

console.log(tokenize("profile.cityName"));
// → ["profile", "city", "Name"]

🧪 Tests

This project uses Jest + TypeScript. Run tests with:

npm test