Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ziqiangwang/remote-sensor

A tiny (~0.3Kb) tool checking if remove resource valid without full download
https://github.com/ziqiangwang/remote-sensor

check fast remote resources sensor tiny

Last synced: 7 days ago
JSON representation

A tiny (~0.3Kb) tool checking if remove resource valid without full download

Awesome Lists containing this project

README

        

# remote-sensor

[![NPM Version][npm-badge]][npm-url]
[![Downloads Stats][npm-downloads]][npm-url]
[![gzip](http://img.badgesize.io/https://unpkg.com/remote-sensor/dist/remote-sensor.min.js?compression=gzip)](https://unpkg.com/remote-sensor/dist/remote-sensor.min.js)

[npm-badge]: https://img.shields.io/npm/v/remote-sensor.svg?style=flat-square
[npm-url]: https://npmjs.org/package/remote-sensor
[npm-downloads]: https://img.shields.io/npm/dm/remote-sensor.svg?style=flat-square

> A tiny (~0.3Kb) tool checking if remove resource valid without full download

## Install

> npm i remote-sensor

or

> yarn add remote-sensor

## Usage

```js
import Sensor from 'remote-sensor';
```

or

```js
const Sensor = require('remote-sensor');
```

or

```html

remoteSensor('https://baidu.png', valid => {
console.log(valid);
});

```

```js
Sensor('https://xxxxx.png', valid => {
console.log(valid);
});
```

# License

MIT@[ZiQiangWang](https://github.com/ZiQiangWang).