
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
single-line-string
Advanced tools
Converts multiline ES6 template strings to a single line & removes extra whitespace.
Simple tag function that converts a multiline ES6 template literal to a single line string, removing extra whitespace. Requires a javascript environment that supports es6 template literals (eg: Node >= 4.7.0).
ES6
import sls from 'single-line-string';
var name = 'June';
const hello = sls`
Hey,
hello,
how
are
you
${name}?
`
console.log(hello); // outputs: "Hey, hello, how are you June?"
or via Common JS
var sls = require('single-line-string');
var name = 'June';
var hello = sls`
Hey,
hello,
how
are
you
${name}?
`;
console.log(hello); // outputs: "Hey, hello, how are you June?"
npm install single-line-string
npm install && npm run build
npm run test
code credit: https://muffinresearch.co.uk/removing-leading-whitespace-in-es6-template-strings/
FAQs
Converts multiline ES6 template strings to a single line & removes extra whitespace.
The npm package single-line-string receives a total of 163 weekly downloads. As such, single-line-string popularity was classified as not popular.
We found that single-line-string 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
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.