Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oneline

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneline

Write nice template literals with newlines, but format as a single-line string

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

oneline

Write nice template literals with newlines, but format as a single-line string. Trims leading/trailing whitespace and replaces all newlines and subsequent whitespace with a single space.

npm versionBuild Status

Installing

npm install --save oneline

Basic usage

const oneline = require('oneline')

const url = 'https://docs.npmjs.com/'
const message = oneline`
  It's a fine day to write a long, verbose string.
  It could contain all sorts of expressions, let's for instance
  inject a URL, say to the NPM docs: ${url}. In the end, this will
  all result in a single line of text.
`

console.log(message)
// It's a fine day to write a long, verbose string. It could contain all sorts of expressions, let's for instance inject a URL, say to the NPM docs: https://docs.npmjs.com/. In the end, this will all result in a single line of text.

Thanks to...

Thanks Hal Henke for donating the package name! <3

License

MIT © Espen Hovlandsdal

Keywords

FAQs

Package last updated on 05 Mar 2019

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