object-strings-deep
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

Object Strings Deep

Retrieves all strings with an object, including keys, properties, recursive objects, and within arrays. 🧵

👪 All Contributors: 1 🤝 Code of Conduct: Kept 🧪 Coverage 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

Usage

npm i object-strings-deep
import { getObjectStringsDeep } from "object-strings-deep";

// ["abc", "def", "ghi"]
getObjectStringsDeep(["abc", { def: ["ghi"] }]);

getObjectStringsDeep recursively uses Object.entries() internally to retrieve all keys and values within an object. It then filters to all strings from keys, properties, and within arrays.

Development

See .github/CONTRIBUTING.md, then .github/DEVELOPMENT.md. Thanks! 🧵

Contributors

Josh Goldberg ✨
Josh Goldberg ✨

💻 🖋 📖 🤔 🚇 🚧 📆 🔧

💝 This package was templated with create-typescript-app using the Bingo engine.

💙 This package was templated with create-typescript-app.

/object-strings-deep/

    Package Sidebar

    Install

    npm i object-strings-deep

    Weekly Downloads

    5,861

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    7.6 kB

    Total Files

    5

    Last publish

    Collaborators

    • joshuakgoldberg