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-rgatsby@everything-registry/sub-chunk-1934gp-cdn-imagegraphql-urllofter-mdlink-checklink-painterlr-util-filelr-filegulp-useref-plusgulp-useref-sfbestgulp-userefconcatgulp-mp-userefgulp-useref-assetsgulp-useref-cdngulp-useref-mininstall-isimg-localizerjson-schema-yup-transformermd-mirror@redocly/gatsby-remark-images@plaa/metascraper-helpers@theowenyoung/transformer-markdown-url@theowenyoung/gatsby-transformer-references@throttleup/gatsby@types/is-relative-url@ta11y/extract@redocly/developer-portal@ragg/gatsby-remark-relative-images@smarterlabs/polymorph@smarterlabs/site-downloader@nodox/gatsby@redocly/readme-converterwebche@sfdocs-internal/check-linkspipen-report-svxpage-link-checkerstratic-indexes-to-rsssvelte-readmeraohai-gatsby-remark-imagesremark-copy-reference-filesremark-lint-no-dead-linksremark-copy-linked-filesremark-embed-imagesremark-embed-images-syncredoc-dev-docsrla-gulp-userefrewrite-markdown-urlssitechecksindresorhus.jssaasify-faas-utilsstatic-build-server@alexkirsz/gatsby-remark-images@dylanvann/gatsby@dylanvann/gatsby-remark-videos@mathieudutour/gatsby@macko911/gatsby@mariolopjr/gatsby-remark-relative-images@mrtnvh/pwa-to-tauri@jeff-tian/gatsby-remark-images-remote@krvajal/gatsby-remark-relative-images@lgenzelis/gatsby-remark-copy-linked-files@lgenzelis/gatsby-remark-images@limedocs/transformer-markdown@metascraper/helpers@nukosuke/gatsby-transformer-orga@burkov/gatsby-remark-videos@boillodmanuel/link-check@bonobolabs/gatsby@bonobolabs/gatsby-remark-images-custom-widths@comsoc/gatsby-mdast-copy-linked-files@cameronhunter/jest-json-schema@7hci/gatsby-pge@ascorbic/gatsby@arshad/gatsby-theme-podcast-core@netlify/content-engine@njkleiner/urls@fczuardi/gatsby-theme-flex@jtanguy/gatsby-transformer-asciidoctor@wardpeet/gatsbycheck-linksblog-engine-saccontent-enginecontract-scraperexpress-rdf-requestg-filegatsby-theme-wikinotesgatsby-theme-flexgatsby-theme-stoqgatsby-theme-primer-wikigatsby-transformer-xsjzipgatsby-typegen-remarkgatsby-typegen-remark-copy-linked-filesgatsby-typegen-remark-responsive-image
4.0.0

2 years ago

3.0.0

5 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