diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..e144b707 --- /dev/null +++ b/.npmignore @@ -0,0 +1,3 @@ +/node_modules +/src +/package-lock.json \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..3cafefc6 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# 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 \ No newline at end of file