singleline
Convert a multiline string to a single line string
Getting started
Install the dependency
npm install singleline --save-dev
React classNames example
; ...<div className=>Some output</div> // className="rrs__select-container rrs__select-container--multiselect rrs__is-desktop rrs__options-container--visible"
Example 2
Passing second parameter in as true
, removes spaces around the HTML tags but it still respects the spaces in the contents of the tags and attributes.
;var testMultilineHTMLString = ; console; // '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>GDD - Giphy Github embed Gif code explorer</title><link href="css/styleguide.css" rel="stylesheet"></head><body><div id="root" class="root"></div><script src="app.js"></script></body></html>'