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

backOpen Source→ast-delete-object→Examples

Table of Contents

  • Quick Take
  • Delete empty objects throughout a tree
  • Delete every object that contains the requested pair
  • Delete a matching object nested under another object
  • Delete the root object when it contains the requested key-value pairs
  • Keep whitespace-only objects when hungry matching is disabled
  • opts.hungryForWhitespace
  • opts.matchKeysStrictly
  • Delete an object that contains additional keys
↑ back to top

Quick Take

↑ back to top

Delete empty objects throughout a tree

↑ back to top

Delete every object that contains the requested pair

↑ back to top

Delete a matching object nested under another object

↑ back to top

Delete the root object when it contains the requested key-value pairs

↑ back to top

Keep whitespace-only objects when hungry matching is disabled

↑ back to top

opts.hungryForWhitespace

↑ back to top

opts.matchKeysStrictly

↑ back to top

Delete an object that contains additional keys

↑ 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