src/index.js
function processDecl(result, decl, opts) {
    const promises = [];

    decl.value = valueParser(decl.value).walk(node => {
        if (
            node.type !== 'function' ||
            node.value !== 'url' ||
            node.nodes.length === 0
        ) {
            return;
        }

        const promise = Promise.resolve()
            .then(() => processUrl(result, decl, node.nodes[0], opts))
            .catch(err => {
                decl.warn(result, err.message);
            });

        promises.push(promise);
    });

    return Promise.all(promises).then(() => decl);
}
function processDecl(result, decl, opts) {
    const promises = [];

    decl.value = valueParser(decl.value).walk(node => {
        if (
            node.type !== 'function' ||
            node.value !== 'url' ||
            node.nodes.length === 0
        ) {
            return;
        }

        const promise = Promise.resolve()
            .then(() => processUrl(result, decl, node.nodes[0], opts))
            .catch(err => {
                decl.warn(result, err.message);
            });

        promises.push(promise);
    });

    return Promise.all(promises).then(() => decl);
}
function processDecl ( result , decl , opts ) { const promises = [ ] ; decl . value = valueParser ( decl . value ) . walk ( node => { if ( node . type !== 'function' || node . value !== 'url' || node . nodes . length === 0 ) { return ; } const promise = Promise . resolve ( ) . then ( ( ) => processUrl ( result , decl , node . nodes [ 0 ] , opts ) ) . catch ( err => { decl . warn ( result , err . message ) ; } ) ; promises . push ( promise ) ; } ) ; return Promise . all ( promises ) . then ( ( ) => decl ) ; }
Processes each declaration using postcss-value-parser

@param {Object} result
@param {Object} decl postcss declaration
@param {Object} opts plugin options
@return {Promise}
Processes each declaration using postcss - value - parser