
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
web-tools-fn
Advanced tools
web-tools-fn 是一个包含多个实用工具函数的 npm 包,主要用于处理图片和图像压缩。
使用 npm 安装 web-tools-fn:
npm install web-tools-fn
- 图片灰度处理(非混合模式)
- 图片灰度处理(混合模式)
- 图片固定尺寸压缩
- 图片固定数值压缩
- 图片原图尺寸绘制
- 详情见IMAGES.README.MD
// 引入
import {
compositeCanvasMode,
convertToGrayscale,
generateFileWithOriginWH,
compressImageWithFixedLength,
compressImageWithFixedSize
}
from 'web-tools-fn/images'
// typescript 引入
import {
compositeCanvasMode,
convertToGrayscale,
generateFileWithOriginWH,
compressImageWithFixedLength,
compressImageWithFixedSize
}
from 'web-tools-fn/images-types'
- 日期格式化
- 相对日期文本格式化
- diff日期
- 详情见DATE.README.MD
// 引入
import {
formatDate,
DateTools,
diffDate
}
from 'web-tools-fn/date'
// typescript 引入
import {
formatDate,
DateTools,
diffDate
}
from 'web-tools-fn/date-types'
FAQs
This is a tool function package about javascript
We found that web-tools-fn demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.