New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rel-to-abs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rel-to-abs

Convert relative URLs to absolute URLs given an HTML source

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
483
decreased by-9.04%
Maintainers
1
Weekly downloads
 
Created
Source

Given an HTML source, it will convert any URL on links, images, scripts, etc to abosulte URLs.

Install

	npm install rel-to-abs

Usage

	var converter = require('rel-to-abs');

	var converted = converter.convert('<img src="foo.png">', 'http://mysite.com');

	## <img src="http://mysite.com">

Credits

http://stackoverflow.com/questions/7544550/javascript-regex-to-change-all-relative-urls-to-absolute

Keywords

FAQs

Package last updated on 27 May 2013

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