Giter Site home page Giter Site logo

stackblogger / link-exists Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 112 KB

A super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.

Home Page: https://www.npmjs.com/package/link-exists

License: MIT License

JavaScript 17.45% TypeScript 82.55%
exists is-link-valid is-url-valid javascript link link-exists link-validator nodejs typescript url url-exist url-validator

link-exists's Introduction

link-exists's People

Contributors

stackblogger avatar

Stargazers

 avatar

Watchers

 avatar  avatar

link-exists's Issues

Regex Issue

Thanks for the library, I think there is an issue with Regex which you may want to consider. Passing as a parametter could be a quick solution imo. This is a valid url in this case: 1h2t3t4p://www.sample.com
Cheers!

Error with React vite.

I get the next error when import the library.

`
Failed to resolve entry for package "http". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]

node_modules/esbuild/lib/main.js:1373:21:
  1373 โ”‚         let result = await callback({
       โ•ต                      ^

at packageEntryFailure (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28691:11)
at resolvePackageEntry (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28688:5)
at tryNodeResolve (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20)
at Context.resolveId (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28)
at Object.resolveId (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:44207:64)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:65837:21
at async file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:39941:34
at async requestCallbacks.on-resolve (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:1373:22)
at async handleRequest (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:729:13)

This error came from the "onResolve" callback registered here:

node_modules/esbuild/lib/main.js:1292:20:
  1292 โ”‚       let promise = setup({
       โ•ต                     ^

at setup (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:39921:19)
at handlePlugins (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:1292:21)
at buildOrContextImpl (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:978:5)
at Object.buildOrContext (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:786:5)
at C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2186:68
at new Promise (<anonymous>)
at Object.context (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2186:27)
at Object.context (C:\Users\luisg\dev\react\my-unsplash-react\node_modules\esbuild\lib\main.js:2026:58)
at prepareEsbuildOptimizerRun (file:///C:/Users/luisg/dev/react/my-unsplash-react/node_modules/vite/dist/node/chunks/dep-df561101.js:45967:35)

The plugin "vite:dep-pre-bundle" was triggered by this import

node_modules/link-exists/dist/index.esm.js:1:13:
  1 โ”‚ import t from"http";const o=/(http(s)?:\/\/.)?(www\....

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.