Build an array of key paths from a nested object, with support for custom separators, escaping, and optional inclusion of values. Version 3.0.0 removes redundant parent keys (e.g., 'a' is omitted when 'a.b' exists) and adds array traversal support. Maintenance-mode library with low release cadence (last major update in 2018). Differentiated by lightweight size, simple API, and escape handling for keys containing dots.
npm install stringify-keysVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage, values output, custom separator, and custom escape function.
Update any code that expects parent keys to be present. Use { values: true } with paths including parents if needed.Use the escape option or manually handle backslash-escaping when processing paths.
Filter out array indices from results if needed, or avoid passing arrays directly.
Consider migrating to alternatives like dot-prop or object-path if active development is needed.
Use 'import stringify from 'stringify-keys'' or 'const stringify = require('stringify-keys')'.Run 'npm install stringify-keys' and ensure the import path is exactly 'stringify-keys'.
Parse the JSON string first: 'stringify(JSON.parse(str))'.
No dependency data recorded yet.