Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

web-tools-fn

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-tools-fn

This is a tool function package about javascript

latest
npmnpm
Version
1.0.11
Version published
Maintainers
1
Created
Source

web-tools-fn

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'

Keywords

javascript

FAQs

Package last updated on 05 Feb 2025

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