get-relative-urls
v1.1.0
Published
Get all the relative URLs in a string
Downloads
1
Maintainers
Readme
get-relative-urls
Get all the relative URLs in a string
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.
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.