Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@safelytyped/url

SafelyTyped2BSD-3-Clause0.2.0TypeScript support: included

A safe type for working with remote locations, for Typescript.

readme

Welcome To @safelytyped/url!

Introduction

This is the README for @safelytyped/url. Rather than put all the docs in one, impossible-to-navigate file, this README is here to point you at where you can find all the documentation we've written.

Quick Start

# run this from your Terminal
npm install @safelytyped/url
// add this import to your Typescript code
import { URL } from "@safelytyped/url"

VS Code users: once you've added a single import anywhere in your project, you'll then be able to auto-import anything else that this library exports.

Documentation

Looking for more detailed documentation? You'll find it under the docs folder.

changelog

CHANGELOG

Introduction

This CHANGELOG tells you:

  • when a release was made
  • what is in each release

It also tells you what changes have been completed, and will be included in the next tagged release.

For each release, changes are grouped under these headings:

  • Backwards-Compatibility Breaks: a list of any backwards-compatibility breaks
  • New: a list of new features. If the feature came from a contributor via a PR, make sure you link to the PR and give them a mention here.
  • Fixes: a list of bugs that have been fixed. If there's an issue for the bug, make sure you link to the GitHub issue here.
  • Dependencies: a list of dependencies that have been added / updated / removed.
  • Tools: a list of bundled tools that have been added / updated / removed.

develop branch

The following changes have been completed, and will be included in the next tagged release.

v0.2.0

Released Saturday, 29th May 2021

Backwards-Compatibility Breaks

Dependencies

  • Upgraded all dependencies to their latest version

New

  • Added URL.toNodeUrl()

v0.1.0

Released Tuesday, 30th June 2020.

New

  • Errors
    • added InvalidURLDataError
  • HRef
    • added makeHRef()
    • added isAbsoluteHRefData()
    • added isHRefHashData()
    • added isHRefSearchData()
    • added isPRHRefData()
  • HRefParts
    • added HRefParts
    • added HRefPartsWithHash
    • added HRefPartsWithHostname
    • added HRefPartsWithPathname
    • added HRefPartsWithSearch
    • added PRHRefParts
    • added isHRefPartsWithHash() type guard
    • added isHRefPartsWithHostname() type guard
    • added isHRefPartsWithPathname() type guard
    • added isPRHRefParts() type guard
  • ParsedURL
    • added ParsedURL interface
  • URL
    • added URL type
      • added URL.base
      • added URL.dirname()
      • added URL.implementsValue()
      • added URL.join()
      • added URL.parse()
      • added URL.resolve()
      • added URL.valueOf()
      • made URL.hash read-only
      • made URL.host read-only
      • made URL.hostname read-only
      • made URL.href read-only
      • made URL.origin read-only
      • made URL.password read-only
      • made URL.pathname read-only
      • made URL.port read-only
      • made URL.protocol read-only
      • made URL.search read-only
      • made URL.searchParams read-only and side effect-free
      • made ULR.username read-only
    • added isURLData()
    • added makeURL()
    • added mustBeURLData()
    • added validateURLData()

Dependencies

  • Added safelytyped/ip-port as a dependency.