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.

Readme

Keywords

none

Package Sidebar

Install

npm i object-strings-deep

Weekly Downloads

6,096

Version

0.1.2

License

MIT

Unpacked Size

7.6 kB

Total Files

5

Last publish

Collaborators

  • joshuakgoldberg