Nanotechnology Promises Much

    css-url-parser

    1.1.3 • Public • Published

    Introduction

    Parse urls from css file

    Build Status Coverage Status Code Climate Version Downloads Dependency Status Gitter

    Installation

    npm install css-url-parser
    

    Usage

    var parseCssUrls = require('css-url-parser');
     
    var css = '@import "a.css"; .image { background-image: url(images/img.png); }';
    var cssUrls = 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.

    Keywords

    Install

    npm i css-url-parser

    DownloadsWeekly Downloads

    31,170

    Version

    1.1.3

    License

    MIT

    Last publish

    Collaborators

    • s0ph1e