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

check-chinese

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

check-chinese - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

20

index.js

@@ -23,10 +23,16 @@ #!/usr/bin/env node

const file = fs.readFileSync(filePath, "utf8");
const hasChinese = file
.toString()
.match(
/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/g
);
if (hasChinese) {
console.log(hasChinese, filePath);
if (
[".js", ".jsx", ".ts", ".tsx", ".go", ".md"].includes(
path.extname(filePath)
)
) {
const hasChinese = file
.toString()
.match(
/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/g
);
if (hasChinese) {
console.log(hasChinese, filePath);
}
}
});
{
"name": "check-chinese",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

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

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