Skip to content

Commit

Permalink
🦄 chore: change package name to meta-fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rocktimsaikia committed Sep 12, 2020
1 parent 5fd66b2 commit 29c01bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "meta-fetch",
"name": "meta-fetcher",
"version": "1.0.0",
"description": "Tiny URL meta-data fetcher that scraps the meta-data of a given URL string",
"keywords": [
Expand Down
14 changes: 7 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# meta-fetch :mag_right:
# meta-fetcher :mag_right:

> Tiny URL meta-data fetcher that scraps the meta-data of a given `URL` string.
![Travis (.com) branch](https://img.shields.io/travis/com/rocktimsaikia/meta-fetch/master)
![Travis (.com) branch](https://img.shields.io/travis/com/rocktimsaikia/meta-fetcher/master)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)

Under the hood it uses [node-fetch](https://github.com/node-fetch/node-fetch) to fetch the metadata, parses it and returns it as json object.

## Install

```sh
npm install meta-fetch
npm install meta-fetcher
```

## Basic Usage
```js
const {fetchMetaData} = require('meta-fetch');
const {fetchMetaData} = require('meta-fetcher');

(async () => {
const result = await fetchMetaData('https://hoppscotch.io/');
Expand Down Expand Up @@ -56,7 +56,7 @@ const {fetchMetaData} = require('meta-fetch');
You can optionally set the `userAgent` and `fromEmail` options in request `Header` while fetching the meta-data.

```js
const {fetchMetaData} = require('meta-fetch');
const {fetchMetaData} = require('meta-fetcher');

(async () => {
const result = await fetchMetaData('https://hoppscotch.io/', {
Expand All @@ -70,7 +70,7 @@ const {fetchMetaData} = require('meta-fetch');

It can also fetch meta-data from `shortened-url` .For example:
```js
const {fetchMetaData} = require('meta-fetch');
const {fetchMetaData} = require('meta-fetcher');

(async () => {
const result = await fetchMetaData('https://bit.ly/2Fj9sNF');
Expand All @@ -83,7 +83,7 @@ You can set these options in Header while fetching the data if needed.

| Option | Required | Default Value |
| :------------- | :----------: | -----------: |
| `userAgent` | No | `meta-fetch` |
| `userAgent` | No | `meta-fetcher` |
| `fromEMail` | No | `[email protected]` |

## API
Expand Down

0 comments on commit 29c01bc

Please sign in to comment.