Skip to content

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

License

Notifications You must be signed in to change notification settings

JoshuaKGoldberg/object-strings-deep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 framework.

πŸ’™ This package was templated with create-typescript-app.

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published