@aemforms/af-formatters

中文文档
1.0.11发布于 2026/11/01Adobe ProprietaryCommonJS零依赖近 30 天下载 5754

Formatting Module for Forms Runtime

原始使用文档
文档目录4 节
  1. Installation
  2. Usage
  3. Testing Local Changes
  4. License

Introduction

The module contains the apis to format the values in form fields as per CLDR spec

Installation

Save it as a dependency

npm i --save @aemforms/af-formatters

Usage

import {format} from '@aemforms/af-formatters'
const value = 1234
format(1234, 'en-US', 'num|currency') //outputs $1,234.00

const value = 2022-10-10
format(1234, 'en-US', 'date|MMM dd, y') //outputs Oct 10, 2022

Testing Local Changes

# Build the package
npm run build

# Link it for local testing
npm link

In your project that uses this package:

npm link @aemforms/af-formatters

License

Copyright 2022 Adobe All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of Adobe and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to Adobe and its suppliers and are protected by all applicable intellectual property laws, including trade secret and copyright laws. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from Adobe.

Adobe permits you to use and modify this file solely in accordance with the terms of the Adobe license agreement accompanying it.

版本与发布记录

@aemforms/af-formatters 共发布 166 个版本,首次发布于 2022/10/08;过去 12 个月发布了 27 个版本。

版本发布日期距今
1.0.11latest2026/11/016 天前
1.0.102026/10/2315 天前
1.0.92026/10/051 个月前
1.0.82026/10/051 个月前
1.0.72026/10/021 个月前
1.0.62026/10/011 个月前

关于 @aemforms/af-formatters 的常见问题

@aemforms/af-formatters 是什么?

Formatting Module for Forms Runtime

如何安装 @aemforms/af-formatters?

在项目目录运行 npm install @aemforms/af-formatters,或使用 pnpm add / yarn add / bun add。

@aemforms/af-formatters 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/aemforms__af-formatters 是否存在。

@aemforms/af-formatters 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@aemforms/af-formatters 可以商用吗?

@aemforms/af-formatters 使用 Adobe Proprietary 许可。声明的许可为 Adobe Proprietary,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@aemforms/af-formatters 的下载量有多少?

根据 npm 官方下载统计,@aemforms/af-formatters 在 2026/10/05 – 2026/11/03 这 30 天内被下载 5,754 次,日均约 192 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aemforms/af-formatters 还在维护吗?

最新版本 1.0.11 发布于 2026/11/01(6 天前);至今共发布 166 个版本,其中过去 12 个月发布了 27 个;首次发布于 2022/10/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。