3.1.0 • Published 8 months ago

is-image-header v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

🌍 » What does it do?

This simple module checks if the given link leads to an image.

🤔 » Installation

npm install is-image-header

📝 » Usage

• Async/await example

const isImage = require('is-image-header');

(async () => {
    const example1 = await isImage('https://cdn.sefinek.net/images/animals/cat/cat-story-25-1377426-min.jpg');
    console.log(example1); // { success: true, status: 200, isImage: true }

    const example2 = await isImage('https://sefinek.net');
    console.log(example2); // { success: true, status: 200, isImage: false }
})();

• Promise example

const isImage = require('is-image-header');

isImage('https://cdn.sefinek.net/images/animals/cat/cat-story-25-1377426-min.jpg').then(console.log); // { success: true, status: 200, isImage: true }
isImage('https://sefinek.net').then(console.log); // { success: true, status: 200, isImage: false }

🤝 » Support

Join our Discord server or open a new Issue.

⭐ » Star

If you enjoy this module, please consider starring the repository.

📜 » License MIT

3.1.0

8 months ago

3.0.7

10 months ago

3.0.6

10 months ago

3.0.5

11 months ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago