get-relative-urls
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

get-relative-urls

Get all the relative URLs in a string

Build Status

I'm aspiring to make open-source my full-time work. If you or your company likes the work that I do, please consider supporting me.

Coffee PayPal

Install

npm i get-relative-urls

Usage

Module

const getRelativeURLs = require( 'get-relative-urls' );
 
let fileContents = require( 'fs' ).readFileSync( 'index.html', 'utf-8' );
 
getRelativeURLs( fileContents );
 
// ['/assets/js/main.js', '/index.html", '/assets/favicon.ico' ...]

Test

npm test

Contribute

Don't be scared raise an issue or a pull request! Any contributions, no matter how big or small will land your picture here.

Adam Zerella

Package Sidebar

Install

npm i get-relative-urls

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

4.26 kB

Total Files

5

Last publish

Collaborators

  • azerella