Sha256: 33a4e4989bf08cd926886b31dd8bd0fcbd2a27fb89220775de6be51d26db9cd1
Contents?: true
Size: 502 Bytes
Versions: 24
Compression:
Stored size: 502 Bytes
Contents
'use strict'; const _ = require('lodash'); /** * Get the index of a declaration's value * * @param {import('postcss').Declaration} decl * * @returns {number} */ module.exports = function (decl) { return [ _.get(decl, 'raws.prop.prefix'), _.get(decl, 'raws.prop.raw', decl.prop), _.get(decl, 'raws.prop.suffix'), _.get(decl, 'raws.between', ':'), _.get(decl, 'raws.value.prefix'), ].reduce((count, str) => { if (str) { return count + str.length; } return count; }, 0); };
Version data entries
24 entries across 24 versions & 1 rubygems