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

oneliner

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneliner - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

18

index.js
module.exports = function () {
var oneline = function (string, dont_trim) {
// Remove the newline characters, in their various formats.
var onelined = string.replace(/(\r\n|\n|\r)/gm, '');
module.exports = function (string, dont_trim) {
// Remove the newline characters, in their various formats.
var onelined = string.replace(/(\r\n|\n|\r)/gm, '');
if (dont_trim) { return onelined; }
if (dont_trim) { return onelined; }
// Trim the extra whitespace on both ends of the string.
var trimmed = onelined.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
// Trim the extra whitespace on both ends of the string.
var trimmed = onelined.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
return trimmed;
};
return oneline;
return trimmed;
};
{
"name": "oneliner",
"description": "Converts a string that contains line feed characters into one that doesn't.",
"version": "0.0.3",
"version": "0.0.4",
"keywords": [

@@ -6,0 +6,0 @@ "strip",

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