Parse urls from css file
Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💖








npm install css-url-parser
varparseCssUrls=require('css-url-parser');varcss='@import "a.css"; .image { background-image: url(images/img.png); }';varcssUrls=parseCssUrls(css);console.log(cssUrls);// [ 'a.css', 'images/img.png' ]It ignores duplicated urls and base64 encoded resources. If no urls found empty array will be returned.