
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
xml-but-prettier
Advanced tools
Beautifies XML documents by putting each tag and text node on their own line and correctly indents everything
This module is a fork of jonathanp/xml-beautifier.
This module beautifies XML documents by putting each tag and text node on their own line and correctly indenting 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.
$ npm install --save xml-beautifier
The module's function signature is xmlButPrettier(xml:String, options:Object)
.
import xmlButPrettier from 'xml-but-prettier';
const xml = xmlButPrettier('<div><span>foo</span></div>');
console.log(xml); // => will output correctly indented elements
indentor
: a custom string to use for indenting thingstextNodesOnSameLine
: compresses text nodes onto the same line as their containing tagsMIT.
FAQs
Beautifies XML documents by putting each tag and text node on their own line and correctly indents everything
The npm package xml-but-prettier receives a total of 426,728 weekly downloads. As such, xml-but-prettier popularity was classified as popular.
We found that xml-but-prettier demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.