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

@spare/lange

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spare/lange - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

2

dist/index.cjs.js

@@ -20,2 +20,3 @@ 'use strict';

const lange = tx => tx.replace(ansiReg, '').replace(astralReg, '_').length;
const Lange = ansi => ansi ? lange : x => x.length;

@@ -26,4 +27,5 @@ const hasAnsi = tx => ansiReg.test(tx);

exports.Lange = Lange;
exports.hasAnsi = hasAnsi;
exports.hasChn = hasChn;
exports.lange = lange;

3

dist/index.esm.js

@@ -16,2 +16,3 @@ const ansi = ['[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'];

const lange = tx => tx.replace(ansiReg, '').replace(astralReg, '_').length;
const Lange = ansi => ansi ? lange : x => x.length;

@@ -22,2 +23,2 @@ const hasAnsi = tx => ansiReg.test(tx);

export { hasAnsi, hasChn, lange };
export { Lange, hasAnsi, hasChn, lange };
{
"name": "@spare/lange",
"version": "0.0.6",
"version": "0.1.0",
"description": "Get string length s.t. correcting astral codes and skipping ansi codes",

@@ -33,3 +33,3 @@ "main": "dist/index.cjs.js",

"homepage": "https://github.com/hoyeungw/spare#readme",
"gitHead": "026b65cd7566cd2bda3e7eaa0bcb03c97671bebf"
"gitHead": "905ae80c07c6d8bc1f4524bc20e88d50187e5c3e"
}
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