Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

url-transformers

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-transformers

A small helper library for manipulating URL strings in Node and in the browser. `url-transformers` provides several functions for common URL transformations, such as adding a search/query string to a URL or appending to the URL pathname.

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
490
decreased by-20.45%
Maintainers
1
Weekly downloads
 
Created
Source

url-transformers

A small helper library for manipulating URL strings in Node and in the browser. url-transformers provides several functions for common URL transformations, such as adding a search/query string to a URL or appending to the URL pathname.

Currently url-transformers provides the following helpers:

  • mapUrl
  • replaceQueryInUrl
  • addQueryToUrl
  • replacePathInUrl
  • replacePathnameInUrl
  • appendPathnameToUrl
  • replaceHashInUrl

There are many more possibilities, so we would love for you to help us grow this collection!

Currently we don't have documentation, however the code is strongly typed using TypeScript, and it should be easy to scan the function signatures. See the tests for example usage.

Installation

yarn add url-transformers
npm install url-transformers

Dependencies

This project depends on monocle-ts (lenses library) and fp-ts. If tree shaking is used (via the module field in package.json) these dependencies will have a neglible impact on the bundle size—at the time of writing they only contribute ~500 bytes (gzipped) to the bundle.

Development

yarn

npm run test

npm run prepublishOnly && npm version patch && npm publish && git push && git push --tags

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc