v1.0.0
This commit is contained in:
32
README.md
Normal file
32
README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# fingerprint
|
||||
|
||||
## Использование
|
||||
|
||||
```js
|
||||
import { get } '@advdominion/fingerprint';
|
||||
|
||||
const fp = await get();
|
||||
|
||||
console.log(fp);
|
||||
````
|
||||
|
||||
### Получение отпечатка и его отправка на сервер
|
||||
|
||||
```js
|
||||
import { get } '@advdominion/fingerprint';
|
||||
|
||||
const send = async (url) => {
|
||||
const fp = await get();
|
||||
try {
|
||||
await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(fp),
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
await send('/');
|
||||
```
|
Reference in New Issue
Block a user