1.1.0 • Published 5 years ago

get-relative-urls v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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.