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

yosay

Package Overview
Dependencies
Maintainers
7
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yosay - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

27

index.js

@@ -87,3 +87,11 @@ 'use strict';

return wrap(stripAnsi(message), maxLength, {hard: true})
const strippedMessage = stripAnsi(message);
const spacesIndex = [];
strippedMessage.split(' ').reduce((accu, cur) => {
spacesIndex.push(accu + cur.length);
return spacesIndex[spacesIndex.length - 1] + 1;
}, 0);
return wrap(strippedMessage, maxLength, {hard: true})
.split(/\n/)

@@ -97,8 +105,19 @@ .reduce((greeting, str, index, array) => {

let offset = 0;
for (let i = 0; i < spacesIndex.length; i++) {
let char = completedString[spacesIndex[i] - offset];
if (char) {
if (char !== ' ') {
offset += 1;
}
} else {
break;
}
}
str = completedString
.substr(completedString.length - str.length)
.replace(/./g, (char, charIndex) => {
if (index > 0) {
charIndex += completedString.length - str.length + index;
}
charIndex += completedString.length - str.length + offset;

@@ -105,0 +124,0 @@ let hasContinuedStyle = 0;

2

package.json
{
"name": "yosay",
"version": "2.0.0",
"version": "2.0.1",
"description": "Tell Yeoman what to say",

@@ -5,0 +5,0 @@ "license": "BSD-2-Clause",

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