Skip to content

Commit

Permalink
README: clean up contents
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanent committed Nov 1, 2020
1 parent 7d1b8ab commit 79bc801
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

> The ultra-lightweight Node.js HTTP client
> The lightweight Node.js HTTP client
[Full documentation](https://ethanent.github.io/phin/global.html) | [GitHub](https://github.com/ethanent/phin) | [NPM](https://www.npmjs.com/package/phin)

Expand All @@ -17,7 +17,7 @@ const res = await p('https://ethanent.me')
console.log(res.body)
```

Note that the above should be in an async context! phin also provides an unpromisified version of the library.
Note that the above should be in an async context! Phin also provides an unpromisified version of the library.


## Install
Expand All @@ -27,14 +27,11 @@ npm install phin
```


## Why phin?
## Why Phin?

phin is **trusted** by some really important projects. The hundreds of contributors at [Less](https://github.com/less/less.js), for example, depend on phin as part of their development process.

Also, phin is super **lightweight**. Like **99.8% smaller than request** lightweight. To compare to other libraries, see [phin vs. the Competition](https://github.com/ethanent/phin/blob/master/README.md#phin-vs-the-competition).

<img src="https://pbs.twimg.com/media/DSPF9TaUQAA0tIe.jpg:large" alt="phin became 33% lighter with release 2.7.0!"/>
Phin is relied upon by important projects and large companies. The hundreds of contributors at [Less](https://github.com/less/less.js), for example, depend on Phin as part of their development process.

Also, Phin is very lightweight. To compare to other libraries, see [Phin vs. the Competition](https://github.com/ethanent/phin/blob/master/README.md#phin-vs-the-competition).

## Quick Demos

Expand Down Expand Up @@ -92,7 +89,7 @@ const res = await ppostjson('https://ethanent.me/somejson')

### Custom Core HTTP Options

phin allows you to set [core HTTP options](https://nodejs.org/api/http.html#http_http_request_url_options_callback).
Phin allows you to set [core HTTP options](https://nodejs.org/api/http.html#http_http_request_url_options_callback).

```js
await p({
Expand All @@ -106,25 +103,24 @@ await p({

## Full Documentation

There's a lot more which can be done with the phin library.
There's a lot more which can be done with the Phin library.

See [the phin documentation](https://ethanent.github.io/phin/).
See [the Phin documentation](https://ethanent.github.io/phin/).


## phin vs. the Competition
## Phin vs. the Competition

phin is a very lightweight library, yet it contains all of the common HTTP client features included in competing libraries!
Phin is a very lightweight library, yet it contains all of the common HTTP client features included in competing libraries!

Here's a size comparison table:

Package | Size
--- | ---
request | [![request package size](https://packagephobia.now.sh/badge?p=request)](https://packagephobia.now.sh/result?p=request)
superagent | [![superagent package size](https://packagephobia.now.sh/badge?p=superagent)](https://packagephobia.now.sh/result?p=superagent)
isomorphic-fetch | [![isomorphic-fetch package size](https://packagephobia.now.sh/badge?p=isomorphic-fetch)](https://packagephobia.now.sh/result?p=isomorphic-fetch)
axios | [![axios package size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
got | [![got package size](https://packagephobia.now.sh/badge?p=got)](https://packagephobia.now.sh/result?p=got)
axios | [![axios package size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
isomorphic-fetch | [![isomorphic-fetch package size](https://packagephobia.now.sh/badge?p=isomorphic-fetch)](https://packagephobia.now.sh/result?p=isomorphic-fetch)
r2 | [![r2 package size](https://packagephobia.now.sh/badge?p=r2)](https://packagephobia.now.sh/result?p=r2)
node-fetch | [![node-fetch package size](https://packagephobia.now.sh/badge?p=node-fetch)](https://packagephobia.now.sh/result?p=node-fetch)
snekfetch | [![snekfetch package size](https://packagephobia.now.sh/badge?p=snekfetch)](https://packagephobia.now.sh/result?p=snekfetch)
phin | [![phin package size](https://packagephobia.now.sh/badge?p=phin)](https://packagephobia.now.sh/result?p=phin)
phin | [![phin package size](https://packagephobia.now.sh/badge?p=phin)](https://packagephobia.now.sh/result?p=phin)

0 comments on commit 79bc801

Please sign in to comment.