Skip to Content
  • Website
Codsen
  • Home
  • Open Source
  • Articles
  • About

backOpen Source→object-flatten-referencing→Examples

Table of Contents

  • Quick Take
  • Wrap an already wrapped value when prevention is disabled
  • Insert a break even when the previous line already contains one
  • Normalise a string setting to an array
  • Avoid adding a break after a line that already ends with one
  • Wrap flattened string values with custom markers
  • Inspect the exported flattening defaults
  • Disable wrapping across the complete input tree
  • Skip wrapping for keys that match a glob
  • Skip wrapping only at an exact nested path
  • Flatten an array with line breaks between rows
  • Flatten an object's keys and values to strings
  • Use HTML rather than XHTML line-break syntax
  • Leave an ignored key and its nested value unchanged
  • Merge array rows without inserting line breaks
  • Flatten input keys even when the reference has no matching key
  • Leave an unmatched input key unchanged
  • Throw when an input key is absent from the reference
  • Set the separator used by flattenObject
  • Keep values that already contain the wrapping markers
  • Leave templating statements unwrapped
↑ back to top

Quick Take

↑ back to top

Wrap an already wrapped value when prevention is disabled

↑ back to top

Insert a break even when the previous line already contains one

↑ back to top

Normalise a string setting to an array

↑ back to top

Avoid adding a break after a line that already ends with one

↑ back to top

Wrap flattened string values with custom markers

↑ back to top

Inspect the exported flattening defaults

↑ back to top

Disable wrapping across the complete input tree

↑ back to top

Skip wrapping for keys that match a glob

↑ back to top

Skip wrapping only at an exact nested path

↑ back to top

Flatten an array with line breaks between rows

↑ back to top

Flatten an object's keys and values to strings

↑ back to top

Use HTML rather than XHTML line-break syntax

↑ back to top

Leave an ignored key and its nested value unchanged

↑ back to top

Merge array rows without inserting line breaks

↑ back to top

Flatten input keys even when the reference has no matching key

↑ back to top

Leave an unmatched input key unchanged

↑ back to top

Throw when an input key is absent from the reference

↑ back to top

Set the separator used by flattenObject

↑ back to top

Keep values that already contain the wrapping markers

↑ back to top

Leave templating statements unwrapped

↑ back to top
back 

Copyright

All rights reserved © Roy Revelt 2026
All our open source packages are under MIT licenceopens in a new tab

Activities

🐛 See a bug? Raise an issueopens in a new tab
💘 Check out the Indiewebopens in a new tab and Libera manifestoopens in a new tab