New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

wordprocessor

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wordprocessor - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+7
-0
index.js

@@ -13,4 +13,11 @@ 'use strict';

countWord(textBlock) {
console.log(textBlock.trim().split(' '));
if (textBlock.trim().split(' ').length === 1 && textBlock.trim().split(' ')[0] === '') {
return 0;
}
return textBlock.trim().split(' ').length;
}
};
+1
-1
{
"name": "wordprocessor",
"version": "1.1.0",
"version": "1.1.1",
"description": "Process the word",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -67,2 +67,26 @@ 'use strict';

it('It correctly counts word of the given roman string', async () => {
// Given
const textBlock = 'one';
// When
const wordProcessor = new WordProcessor();
const totalCharacters = wordProcessor.countWord(textBlock);
// Then
expect(totalCharacters).equal(1);
});
it('It correctly counts word of the given roman string', async () => {
// Given
const textBlock = '';
// When
const wordProcessor = new WordProcessor();
const totalCharacters = wordProcessor.countWord(textBlock);
// Then
expect(totalCharacters).equal(0);
});
it('It correctly counts word of the given nepali string', async () => {

@@ -69,0 +93,0 @@ // Given