stylelint
Version:
A mighty, modern CSS linter.
13 lines (11 loc) • 315 B
JavaScript
/* @flow */
;
/**
* Get the index of a declaration's value
*/
module.exports = function(decl /*: Object*/) /*: number*/ {
const beforeColon = decl.toString().indexOf(":");
const afterColon =
decl.raw("between").length - decl.raw("between").indexOf(":");
return beforeColon + afterColon;
};