New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.7.6 to 0.7.7

8

dist/index.cjs.js

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

const astralReg = new RegExp(astral.join('|'), 'g');
const chineseReg = new RegExp(chinese.join('|'), 'g');

@@ -23,6 +22,9 @@ /**

const hasAnsi = tx => ansiReg.test(tx);
const ANSI = new RegExp(ansi.join('|'));
const HAN = new RegExp(chinese.join('|'));
const hasChn = tx => chineseReg.test(tx);
const hasAnsi = tx => ANSI.test(tx);
const hasChn = tx => HAN.test(tx);
exports.Lange = Lange;

@@ -29,0 +31,0 @@ exports.hasAnsi = hasAnsi;

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

const astralReg = new RegExp(astral.join('|'), 'g');
const chineseReg = new RegExp(chinese.join('|'), 'g');

@@ -19,6 +18,9 @@ /**

const hasAnsi = tx => ansiReg.test(tx);
const ANSI = new RegExp(ansi.join('|'));
const HAN = new RegExp(chinese.join('|'));
const hasChn = tx => chineseReg.test(tx);
const hasAnsi = tx => ANSI.test(tx);
const hasChn = tx => HAN.test(tx);
export { Lange, hasAnsi, hasChn, lange };
{
"name": "@spare/lange",
"version": "0.7.6",
"version": "0.7.7",
"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/gadge/spare#readme",
"gitHead": "c8ba65c4d8715a4102e55d2eecb5fea2d28f4d37"
"gitHead": "4b139f92cd13620c4f594413deec4b2b08454dd8"
}
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