@carisls/xmlreport-reader

中文文档
0.9.3发布于 2024/04/13MITCommonJS近 30 天下载 1911

Component for reading of Caris XML Reports

原始使用文档
文档目录4 节
  1. Installation
  2. API Usage
  3. CLI Usage
  4. Supported elements

XML Report Reader

NPM Version NPM Downloads Install Size

The purpose of this component is reading of standard XML documents with genomics data created by Caris Life Sciences.

It can be used from inside Node.js application API or as an executable CLI.

Installation

npm i @carisls/xmlreport-reader

If you want to use it globally (not only inside application folder) you can install it with -g flag.

npm i -g @carisls/xmlreport-reader

API Usage

const xmlReader = require('@carisls/xmlreport-reader');

const { promises: fs } = require('fs');

(async() => {
  // Get XML file contents
  const fileContents = await fs.readFile('./myfile.xml', 'utf8');

  // Parse XML into Report
  const report = xmlReader(fileContents);

  // Prettify report JSON
  const reportString = JSON.stringify(report, null, 2);

  // Write to console
  console.log(reportString);

})()
  .catch((err) => {
    console.error(err);
  });

CLI Usage

This component can be run as a CLI, too (outside an application).

xmlreport file.xml

If you want to print its output into some file, you can execute

xmlreport file.xml > output.json

Supported elements

Only few elements are currently supported for extraction:

  • Cancer-Relevant Biomarkers
  • Genomic Signatures
  • Immunohistochemistry (IHC)
  • Human Leukocyte Antigen (HLA)
  • Available Clinical Trials
  • References (supporting treatments)

版本与发布记录

@carisls/xmlreport-reader 共发布 39 个版本,首次发布于 2021/07/12;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.9.3latest2024/04/132 年前
0.9.22024/04/122 年前
0.9.12024/04/052 年前
0.9.02024/03/022 年前
0.8.42023/10/263 年前
0.8.32023/10/253 年前

关于 @carisls/xmlreport-reader 的常见问题

@carisls/xmlreport-reader 是什么?

Component for reading of Caris XML Reports

如何安装 @carisls/xmlreport-reader?

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

@carisls/xmlreport-reader 支持 TypeScript 吗?

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

@carisls/xmlreport-reader 支持 ESM 还是 CommonJS?

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

@carisls/xmlreport-reader 可以商用吗?

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

@carisls/xmlreport-reader 的下载量有多少?

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

@carisls/xmlreport-reader 还在维护吗?

最新版本 0.9.3 发布于 2024/04/13(2 年前);至今共发布 39 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/07/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。