Skip to content

Commit c1c99fe

Browse files
committed
📃[docs] add package docs
1 parent f052aff commit c1c99fe

52 files changed

Lines changed: 26057 additions & 8 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# is-port-reachable
2+
3+
> Check if a local or remote port is reachable
4+
5+
## Install
6+
7+
```sh
8+
npm install is-port-reachable
9+
```
10+
11+
## Usage
12+
13+
```js
14+
import isPortReachable from 'is-port-reachable';
15+
16+
console.log(await isPortReachable(80, {host: 'google.com'}));
17+
//=> true
18+
```
19+
20+
## API
21+
22+
### isPortReachable(options)
23+
24+
Returns `Promise<boolean>` for whether the port is reachable.
25+
26+
##### port
27+
28+
Type: `number`
29+
30+
The port to check.
31+
32+
#### options
33+
34+
Type: `object`
35+
36+
##### host
37+
38+
**Required**\
39+
Type: `string`\
40+
Example: `'localhost'`
41+
42+
The host to check.
43+
44+
Can be a domain (optionally, with a sub-domain) or an IP address.
45+
46+
##### timeout
47+
48+
Type: `number`\
49+
Default: `1000`
50+
51+
The time to wait in milliseconds before giving up.
52+
53+
## Related
54+
55+
- [is-reachable](https://github.com/sindresorhus/is-reachable/) - Check if servers are reachable
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# react-chartjs-2
2+
3+
<img align="right" width="150" height="150" alt="Logo" src="website/static/img/logo.svg">
4+
5+
React components for <a href="https://www.chartjs.org">Chart.js</a>, the most popular charting library.
6+
7+
Supports Chart.js v4 and v3.
8+
9+
[![NPM version][npm]][npm-url]
10+
[![Downloads][downloads]][downloads-url]
11+
[![Build status][build]][build-url]
12+
[![Coverage status][coverage]][coverage-url]
13+
[![Bundle size][size]][size-url]
14+
15+
[npm]: https://img.shields.io/npm/v/react-chartjs-2.svg
16+
[npm-url]: https://www.npmjs.com/package/react-chartjs-2
17+
18+
[downloads]: https://img.shields.io/npm/dm/react-chartjs-2.svg
19+
[downloads-url]: https://www.npmjs.com/package/react-chartjs-2
20+
21+
[build]: https://img.shields.io/github/actions/workflow/status/reactchartjs/react-chartjs-2/ci.yml?branch=master
22+
[build-url]: https://github.com/reactchartjs/react-chartjs-2/actions
23+
24+
[coverage]: https://img.shields.io/codecov/c/github/reactchartjs/react-chartjs-2.svg
25+
[coverage-url]: https://app.codecov.io/gh/reactchartjs/react-chartjs-2
26+
27+
[size]: https://img.shields.io/bundlephobia/minzip/react-chartjs-2
28+
[size-url]: https://bundlephobia.com/package/react-chartjs-2
29+
30+
<br />
31+
<a href="#quickstart">Quickstart</a>
32+
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
33+
<a href="#docs">Docs</a>
34+
<span>&nbsp;&nbsp;&nbsp;&nbsp;</span>
35+
<a href="https://stackoverflow.com/questions/tagged/react-chartjs-2">Stack Overflow</a>
36+
<br />
37+
<hr />
38+
39+
## Quickstart
40+
41+
Install this library with peer dependencies:
42+
43+
```bash
44+
pnpm add react-chartjs-2 chart.js
45+
# or
46+
yarn add react-chartjs-2 chart.js
47+
# or
48+
npm i react-chartjs-2 chart.js
49+
```
50+
51+
We recommend using `chart.js@^4.0.0`.
52+
53+
Then, import and use individual components:
54+
55+
```jsx
56+
import { Doughnut } from 'react-chartjs-2';
57+
58+
<Doughnut data={...} />
59+
```
60+
61+
## Docs
62+
63+
- [Migration to v4](https://react-chartjs-2.js.org/docs/migration-to-v4)
64+
- [Working with datasets](https://react-chartjs-2.js.org/docs/working-with-datasets)
65+
- [Working with events](https://react-chartjs-2.js.org/docs/working-with-events)
66+
- [FAQ](https://react-chartjs-2.js.org/faq)
67+
- [Components](https://react-chartjs-2.js.org/components)
68+
- [Examples](https://react-chartjs-2.js.org/examples)
69+
70+
## License
71+
72+
[MIT Licensed](LICENSE)
73+
Copyright (c) 2020 Jeremy Ayerst
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->
2+
3+
- [Installation (for meteorjs, gatsbyjs, etc)](#installation-for-meteorjs-gatsbyjs-etc)
4+
- [Usage](#usage)
5+
- [More info](#more-info)
6+
7+
<!-- TOC end -->
8+
9+
React Icons
10+
npm GitHub Actions build status
11+
12+
Include popular icons in your React projects easily with react-icons, which utilizes ES6 imports that allows you to include only the icons that your project is using.
13+
14+
<!-- TOC --><a name="installation-for-meteorjs-gatsbyjs-etc"></a>
15+
## Installation (for meteorjs, gatsbyjs, etc)
16+
17+
If your project grows in size, this option is available. This method has
18+
the trade-off that it takes a long time to install the package. Suitable
19+
for MeteorJS, Gatsbyjs etc.
20+
21+
``` {.astro-code .github-dark style="background-color:#24292e;color:#e1e4e8; overflow-x: auto;" tabindex="0" data-language="bash"}
22+
npm install @react-icons/all-files --save
23+
```
24+
25+
<!-- TOC --><a name="usage"></a>
26+
### Usage
27+
28+
``` {.astro-code .github-dark style="background-color:#24292e;color:#e1e4e8; overflow-x: auto;" tabindex="0" data-language="jsx"}
29+
import { FaBeer } from "@react-icons/all-files/fa/FaBeer";
30+
31+
class Question extends React.Component {
32+
render() {
33+
return <h3> Lets go for a <FaBeer />? </h3>
34+
}
35+
}
36+
```
37+
38+
<!-- TOC --><a name="more-info"></a>
39+
## More info
40+
41+
[GitHub ↗](https://github.com/react-icons/react-icons)
42+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
43+
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

0 commit comments

Comments
 (0)