Files
favicon-trap/README.md
kangkang520 121e98f74a 添加readme
2018-11-27 22:35:46 +08:00

31 lines
601 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# FAVICON-TRAP
A util allows you get favicons from a url
using this util you can get all favicons from given url.
# Installation
```
npm install favicon-trap
```
# Usage
there is only one function, it's verry easilly!
you can find more information from `.d.ts` file
```typescript
import { favicon } from 'favicon-trap'
favicon('/path/to/url', option).then(icons=>console.log(icons))
```
# Option
* **types**: which types of icons you want, "icon"、"apple-touch-icon" default: ['icon']
* **timeout**: http request timeout (unit:ms), default: 5000
* **headers**: headers of http request