Socket
Socket
Sign inDemoInstall

xml-beautifier

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-beautifier

Beautifies XML documents by putting each tag and text node on their own line and correctly indents everything


Version published
Weekly downloads
13K
increased by3.29%
Maintainers
1
Weekly downloads
 
Created
Source

XML Beautifier

Tests NPM version

This module "beautifies" XML documents by putting each tag and text node on their own line and correctly indents everything.

Can be used e.g. if you're using React as a static page generator and (for some reason) need the generated HTML to be more human-readable.

Install

$ npm install --save xml-beautifier

Usage

import beautify from "xml-beautifier";

const xml = beautify("<div><span>foo</span></div>");
console.log(xml); // => will output correctly indented elements

License

MIT © Jonathan Svenheden

FAQs

Package last updated on 09 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc