Skip to content

Add support for promise#4

Open
ChenLi0830 wants to merge 1 commit into
boblauer:masterfrom
ChenLi0830:feature-support-promise
Open

Add support for promise#4
ChenLi0830 wants to merge 1 commit into
boblauer:masterfrom
ChenLi0830:feature-support-promise

Conversation

@ChenLi0830

Copy link
Copy Markdown

Make the url-exists support promises.

urlExists('https://www.google.com')
  .then(exists => {
    // do stuff
  })

@eric-hc

eric-hc commented Mar 25, 2020

Copy link
Copy Markdown

I would use this package now: https://github.com/Richienb/url-exist

For anyone that came across this one and saw this PR and repo not being maintained.

@mma86-defy

Copy link
Copy Markdown

Use

import { promisify } from 'util';
import urlExists from 'url-exists';

const urlExistsAwaitable = promisify(urlExists);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants