New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

files-sets

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

files-sets

nodejs命令行对用行分隔的文件做集合运算

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

nodejs命令行求交集数量

给产品写的

如何使用?

先去安装一下最新版本的nodejs

https://nodejs.org/zh-cn/

然后在命令行里运行:

npm i files-sets -g

然后执行命令:

files-sets intersection --base=./examples/txt2.txt --compare=./examples/txt1.txt

参数

--base 基础集合的文件路径 必传

--compare 比较集合的文件路径 必传

--size 每次运算加载的数据量,默认为12000000,如果设置的太大会超过node v8引擎的限制

--mode 是否使用内存模式,默认是false,如果设置为true的话会直接全部加载到内存中去求集合,适合小文件的比较

note

请确保文件里每行的内容都是唯一的 目前只实现了交集,其他的产品没提需求。

Keywords

FAQs

Package last updated on 29 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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