4.0.0 • Published 2 years ago

is-relative-url v4.0.0

Weekly downloads
530,133
License
MIT
Repository
github
Last release
2 years ago

is-relative-url

Check if a URL is relative

Install

npm install is-relative-url

Usage

import isRelativeUrl from 'is-relative-url';

isRelativeUrl('foo/bar');
//=> true

isRelativeUrl('https://sindresorhus.com/foo/bar');
//=> false

isRelativeUrl('//sindresorhus.com');
//=> true

Related

See is-absolute-url for the inverse.

gatsby-theme-tablex@cangir/gatsby-theme-flex@cangir/gatsby-theme-podcast-coreearthballgatsby-remark-images-es@infinitebrahmanuniverse/nolb-is-r@everything-registry/sub-chunk-1934svelte-readmewebchesaasify-faas-utilsrla-gulp-userefremark-copy-linked-filesremark-copy-reference-filesremark-embed-imagesremark-embed-images-syncremark-lint-no-dead-linksrewrite-markdown-urlsredoc-dev-docsstatic-build-server@sfdocs-internal/check-linkslofter-mdlink-checklink-paintergraphql-urljson-schema-yup-transformerinstall-ismd-mirrorimg-localizergp-cdn-imagegulp-useref-assetsgulp-useref-cdngulp-useref-mingulp-userefconcatgulp-useref-plusgulp-useref-sfbestgulp-mp-usereflr-filelr-util-filepage-link-checkerpipen-report-svxraohai-gatsby-remark-imagesstratic-indexes-to-rsssitechecksindresorhus.js@arshad/gatsby-theme-podcast-core@ascorbic/gatsby@agentic/core@alexkirsz/gatsby-remark-images@burkov/gatsby-remark-videos@7hci/gatsby-pge@boillodmanuel/link-check@bonobolabs/gatsby@bonobolabs/gatsby-remark-images-custom-widths@fczuardi/gatsby-theme-flex@krvajal/gatsby-remark-relative-images@lgenzelis/gatsby-remark-copy-linked-files@lgenzelis/gatsby-remark-images@limedocs/transformer-markdown@macko911/gatsby@mrtnvh/pwa-to-tauri@mariolopjr/gatsby-remark-relative-images@mathieudutour/gatsby@netlify/content-engine@njkleiner/urls@nodox/gatsby@dylanvann/gatsby@dylanvann/gatsby-remark-videos@metascraper/helpers@jeff-tian/gatsby-remark-images-remote@jtanguy/gatsby-transformer-asciidoctor@ragg/gatsby-remark-relative-images@redocly/developer-portal@redocly/gatsby-remark-images@redocly/readme-converter@nukosuke/gatsby-transformer-orga@plaa/metascraper-helpers@smarterlabs/polymorph@smarterlabs/site-downloader@ta11y/extract@comsoc/gatsby-mdast-copy-linked-files@cameronhunter/jest-json-schema@throttleup/gatsby@theowenyoung/transformer-markdown-url@theowenyoung/gatsby-transformer-references@types/is-relative-url@wardpeet/gatsbyblog-engine-saccheck-linkscontent-engineexpress-rdf-requestgatsby-remark-responsive-imagegatsby-remark-static-imagesgatsby-remark-use-frontmatter-pathgatsby-remark-video-postergatsby-remark-videosgatsby-remark-visualdocsgatsby-remark-rehype-imagesgatsby-remark-relative-body-imagesgatsby-remark-relative-images-v2gatsby-remark-relative-source
4.0.0

2 years ago

3.0.0

6 years ago

2.0.0

9 years ago

1.0.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago