-price-checker

中文文档
1.0.0发布于 2024/03/14ISCCommonJS

check price

原始使用文档
文档目录5 节
  1. API Documentation
  2. getEthPrice()
  3. Examples
  4. Contributing
  5. License
#  Price Checker

[![npm version](https://img.shields.io/npm/v/-price-checker.svg?style=flat-square)](https://www.npmjs.com/package/-price-checker)

A simple package to retrieve the current price of Bitcoin ().

## Installation

Install the package using npm:

npm install -price-checker


## Usage

To use the package, you need to import it:

```javascript
const ethPriceChecker = require('-price-checker');

Then, you can call the getETHPrice() function to retrieve the current price of Bitcoin:

ethPriceChecker.getEthPrice()
  .then(price => {
    console.log(`The current price of Bitcoin is $${price}`);
  })
  .catch(error => {
    console.error('Error fetching  price:', error);
  });

API Documentation

The package provides the following function:

getEthPrice()

This function fetches the current price of Bitcoin from a reliable data source. It returns a Promise that resolves to the current price in USD.

Examples

Here's an example of how to use the getEthPrice() function:

const ethPriceChecker = require('-price-checker');

ethPriceChecker.getEthPrice()
  .then(price => {
    console.log(`The current price of  is $${price}`);
  })
  .catch(error => {
    console.error('Error fetching  price:', error);
  });

Contributing

If you wish to contribute to this package, you can follow the guidelines in CONTRIBUTING.md file.

License

This package is licensed under the MIT License.

版本与发布记录

-price-checker 共发布 4 个版本,首次发布于 2024/03/14;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.0latest2024/03/142 年前
1.0.52024/03/142 年前
1.0.42024/03/142 年前
1.0.32024/03/142 年前

关于 -price-checker 的常见问题

-price-checker 是什么?

检查价格

如何安装 -price-checker?

在项目目录运行 npm install -- -price-checker,或使用 pnpm add / yarn add / bun add。

-price-checker 支持 TypeScript 吗?

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

-price-checker 支持 ESM 还是 CommonJS?

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

-price-checker 可以商用吗?

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

-price-checker 还在维护吗?

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