
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
fix-whitespace
Advanced tools
A tiny library that fixes whitespace in JavaScript template strings.
A tiny library that fixes whitespace in JavaScript template strings.
const items = [1, 2, 3]
const generateSitePage = (head, content) => fixWhitespace`
<!DOCTYPE html>
<html>
<head>
(Begin head..)${head}(..End head)
<meta charset='utf-8'>
</head>
<body>
<div id='content'>
${"Early insert!"} (Begin content x1..)${content}(..end content; begin content x2..)${content}(..end content!)
${"And back down."}
</div>
</body>
</html>
`
console.log(generateSitePage(
fixWhitespace`
<title>Hello, world!</title>
`,
fixWhitespace`
<ul>${items.map(x => `<li>${x}</li>`).join('\n')}</ul>
`
))
<!DOCTYPE html>
<html>
<head>
(Begin head..)<title>Hello, world!</title>(..End head)
<meta charset='utf-8'>
</head>
<body>
<div id='content'>
Early insert! (Begin content x1..)<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<!-- Further indent at end! -->(..end content; begin content x2..)<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
<!-- Further indent at end! -->(..end content!)
And back down.
</div>
</body>
</html>
FAQs
A tiny library that fixes whitespace in JavaScript template strings.
The npm package fix-whitespace receives a total of 16 weekly downloads. As such, fix-whitespace popularity was classified as not popular.
We found that fix-whitespace 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.