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

string-length

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-length - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

8

index.js

@@ -5,4 +5,10 @@ 'use strict';

const stringLength = string => stripAnsi(string).match(charRegex()).length;
const stringLength = string => {
if (string === '') {
return 0;
}
return stripAnsi(string).match(charRegex()).length;
};
module.exports = stringLength;

2

package.json
{
"name": "string-length",
"version": "4.0.0",
"version": "4.0.1",
"description": "Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes",

@@ -5,0 +5,0 @@ "license": "MIT",

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