New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

putil-flattentext

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

putil-flattentext - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

27

lib/flattentext.js

@@ -10,2 +10,7 @@ /* putil-flattentext

/**
* Expose Module
*/
module.exports = flattenText;
/**
*

@@ -21,18 +26,19 @@ * @param {string} input

options.indent = options.indent || 2;
let out = '';
let indent = 0;
var out = '';
var indent = 0;
const fillChar = function(cnt, chr = ' ') {
let str = '';
for (let i = 0; i < cnt; i++)
const fillChar = function(cnt, chr) {
if (chr === undefined) chr = ' ';
var str = '';
for (var i = 0; i < cnt; i++)
str += chr;
return str;
};
let newline = 0;
let pchr = 0;
var newline = 0;
var pchr = 0;
input = String(input);
for (let i = 0; i < input.length; i++) {
let chr = input.charAt(i);
let k = 0;
for (var i = 0; i < input.length; i++) {
var chr = input.charAt(i);
var k = 0;
while (options.noWrap && ['\t', '\n', '\r', '\b'].includes(chr)) {

@@ -81,2 +87,1 @@ if (chr === '\b')

module.exports = flattenText;
{
"name": "putil-flattentext",
"description": "Simple utility that converts manipulate \t \b \r characters and flattens text",
"version": "1.0.1",
"version": "1.1.0",
"author": "Panates Ltd.",

@@ -19,10 +19,10 @@ "contributors": [

"devDependencies": {
"babel-eslint": "^7.2.3",
"eslint": "^3.19.0",
"eslint-config-google": "^0.8.0",
"babel-eslint": "^8.0.1",
"eslint": "^4.9.0",
"eslint-config-google": "^0.9.1",
"istanbul": "^0.4.5",
"mocha": "^3.4.2"
"mocha": "^4.0.1"
},
"engines": {
"node": ">= 6.0"
"node": ">= 4.0"
},

@@ -29,0 +29,0 @@ "directories": {

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