4.0.0 • Published 3 years ago

is-relative-url v4.0.0

Weekly downloads
530,133
License
MIT
Repository
github
Last release
3 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-readmewebchestatic-build-server@comsoc/gatsby-mdast-copy-linked-files@cameronhunter/jest-json-schemajson-schema-yup-transformerinstall-is@sfdocs-internal/check-linksstratic-indexes-to-rss@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-downloaderpage-link-checkerremark-copy-linked-filesremark-copy-reference-filesremark-embed-images-syncremark-embed-imagesremark-lint-no-dead-linkssaasify-faas-utilspipen-report-svxrewrite-markdown-urlsredoc-dev-docsrla-gulp-userefraohai-gatsby-remark-imagessitechecksindresorhus.jsgp-cdn-imagegraphql-urlimg-localizergulp-mp-userefgulp-useref-assetsgulp-useref-cdngulp-useref-mingulp-useref-plusgulp-useref-sfbestgulp-userefconcatlink-checklink-painterlr-filelr-util-filelofter-mdmd-mirror@theowenyoung/gatsby-transformer-references@theowenyoung/transformer-markdown-url@throttleup/gatsby@ta11y/extract@types/is-relative-url@wardpeet/gatsbycheck-linkscontent-engineblog-engine-sacexpress-rdf-requestgamelynx-gatsbygatsby-remark-copy-linked-files-with-postergatsby-remark-copy-imagesgatsby-remark-copy-linked-filesgatsby-remark-component-imagesgatsby-remark-external-linksgatsby-remark-external-links-phgatsby-remark-use-frontmatter-pathgatsby-remark-video-postergatsby-remark-videos
4.0.0

3 years ago

3.0.0

6 years ago

2.0.0

9 years ago

1.0.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago