1234567891011121314151617181920212223242526272829 |
- 'use strict';
- module.exports = function declarationValueIndex(decl) {
- const raws = decl.raws;
- return [
-
- raws.prop && raws.prop.prefix,
-
- (raws.prop && raws.prop.raw) || decl.prop,
-
- raws.prop && raws.prop.suffix,
- raws.between || ':',
-
- raws.value && raws.value.prefix,
- ].reduce((count, str) => {
- if (str) {
- return count + str.length;
- }
- return count;
- }, 0);
- };
|