Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
feat: Rename to @asd14/fetch-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidmt committed Nov 7, 2020
1 parent 6893ef2 commit 94ee7bc
Show file tree
Hide file tree
Showing 7 changed files with 1,568 additions and 1,436 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"root": true,

"extends": [
"@mutant-ws/eslint-config/targets/html",
"@asd14/eslint-config/targets/html",
],

"globals": {
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port

# Ctags
tags
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# fetch-browser

Thin wrapper over [`window.fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Sister library of [`@mutant-ws/fetch-node`](https://github.com/mutant-ws/fetch-node).
Thin wrapper over [`window.fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Sister library of [`@asd14/fetch-node`](https://github.com/asd-xiv/fetch-node).

<!-- vim-markdown-toc GFM -->

Expand All @@ -22,13 +22,13 @@ Thin wrapper over [`window.fetch`](https://developer.mozilla.org/en-US/docs/Web/
## Install

```bash
npm i @mutant-ws/fetch-browser
npm i @asd14/fetch-browser
```

## Initialize

```javascript
import { set } from "@mutant-ws/fetch-browser"
import { set } from "@asd14/fetch-browser"

set({
// Throws if not set and using relative paths
Expand All @@ -39,7 +39,7 @@ set({
### Default headers

```javascript
import { set } from "@mutant-ws/fetch-browser"
import { set } from "@asd14/fetch-browser"

set({
// Persistent headers
Expand All @@ -60,7 +60,7 @@ There is no built-in way to handle query params but you can set a custom
transform function.

```javascript
import { set } from "@mutant-ws/fetch-browser"
import { set } from "@asd14/fetch-browser"
import { stringify } from "qs"

set({
Expand All @@ -78,7 +78,7 @@ set({
## `GET`

```javascript
import { GET } from "@mutant-ws/fetch-browser"
import { GET } from "@asd14/fetch-browser"

const myIP = await GET("https://api.ipify.org", {
query: {
Expand All @@ -98,4 +98,4 @@ const myIP = await GET("https://api.ipify.org", {

## Changelog

See the [releases section](https://github.com/mutant-ws/fetch-browser/releases) for details.
See the [releases section](https://github.com/asd-xiv/fetch-browser/releases) for details.
Loading

0 comments on commit 94ee7bc

Please sign in to comment.