@financial-times/js-features-analyser

中文文档
0.4.3发布于 2021/07/09MIT近 30 天下载 2210

How to use

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录7 节
  1. Table Of Contents
  2. Usage
  3. Limitations
  4. Contributing
  5. Publishing
  6. Contact
  7. Licence

JavaScript Feature Analyser

A Node.js command-line application for figuring out what standard-library features are being used within a JavaScript file.

NPM version MIT licensed

> npx @financial-times/js-features-analyser analyse --file bundle.js

Table Of Contents

Usage

This project requires Node.js 10.x and npm. You can install with:

npm install @financial-times/js-features-analyser

Limitations

This project does not compile syntax at all.

Create a bundle which targets the syntax level you support (ES3/5/2017/2019) and then pass that bundle through this tool.

The reason to create the bundle first is because if you are compiling your code down to another syntax level, the compiled code will contain different built-ins than the uncompiled version. E.G. Compiling async function() { await 7;} to ES5 will make the compiled output have Promise in it, which this tool will then detect.

This project does not know the types that are within the code being analysed, which means that when it sees a name of a builtin being used, it will add all the builtins which match that name to it's output. E.G. Analysing [1].reduce(function(){}) will not only detect that Array.prototype.reduce was used, it would also incorrectly detect that Int8Array.prototype.reduce, Uint8Array.prototype.reduce, Uint8ClampedArray.prototype.reduce, Int16Array.prototype.reduce, Uint16Array.prototype.reduce, Int32Array.prototype.reduce, Uint32Array.prototype.reduce, Float32Array.prototype.reduce, and Float64Array.prototype.reduce were also used.

Contributing

This module has a full suite of unit tests, and is verified with ESLint. You can use the following commands to check your code before opening a pull request:

npm test    # verify JavaScript code with ESLint and run the tests

Publishing

New versions of the module are published automatically by CI for every commit which lands on the master branch.

Contact

If you have any questions or comments about this module, or need help using it, please raise an issue.

Licence

This software is under the MIT licence.

版本与发布记录

@financial-times/js-features-analyser 共发布 6 个版本,首次发布于 2019/07/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.4.3latest2021/07/095 年前
0.4.22021/01/235 年前
0.0.42019/07/187 年前
0.0.32019/07/187 年前
0.0.22019/07/187 年前
0.0.12019/07/177 年前

关于 @financial-times/js-features-analyser 的常见问题

@financial-times/js-features-analyser 是什么?

How to use注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @financial-times/js-features-analyser?

在项目目录运行 npm install @financial-times/js-features-analyser,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 js-features-analyser,可以用 npx js-features-analyser 直接运行。

@financial-times/js-features-analyser 支持 TypeScript 吗?

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

@financial-times/js-features-analyser 可以商用吗?

@financial-times/js-features-analyser 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@financial-times/js-features-analyser 的下载量有多少?

根据 npm 官方下载统计,@financial-times/js-features-analyser 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,210 次,日均约 74 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@financial-times/js-features-analyser 还在维护吗?

最新版本 0.4.3 发布于 2021/07/09(5 年前);至今共发布 6 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/07/17。作者已将其标记为弃用,新项目建议寻找替代方案。