# url-is-protoless

> An incredibly simple utility to check if a given url does not have a protocol, while still representing a path.

Latest version **1.0.0** (published 2018-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install url-is-protoless
pnpm add url-is-protoless
yarn add url-is-protoless
bun add url-is-protoless
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-01-01 |
| First published | 2018-01-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tom Medema |
| Maintainers | tommedema |
| Keywords | url, uri, relative, absolute, protocol |

## Links

- npm: https://www.npmjs.com/package/url-is-protoless
- Repository: https://github.com/tommedema/url-is-protoless
- Issues: https://github.com/tommedema/url-is-protoless/issues
- npm.io page: https://npm.io/package/url-is-protoless

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-01-01
- 0.1.0 — 2018-01-01

## README

# url-is-protoless

An incredibly simple utility to check if a given url does not have a protocol, while still representing a path. This is typically used to determine if found urls are relative rather than absolute.

[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard)
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [isProtoless](#isprotoless)

## isProtoless

Returns if a url does not have a protocol, while still representing a path.

**Parameters**

-   `tUrl` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** the url to test

**Examples**

```javascript
const isProtoless = require('url-is-protoless')
console.log(isProtoless('./assets/icon.png')) // true
console.log(isProtoless('http://example.com/assets/icon.png')) // false
console.log(isProtoless('//example.com/assets/icon.png')) // true
```

Returns **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** whether the url is without a protocol

---
_Source: https://npm.io/package/url-is-protoless · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
