.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / utils / isCustomPropertySet.js
1 /* @flow */
2 "use strict";
3
4 const _ = require("lodash");
5 const hasBlock = require("../utils/hasBlock");
6
7 /**
8  * Check whether a Node is a custom property set
9  */
10 module.exports = function(node /*: Object*/) /*: boolean*/ {
11   const selector = _.get(node, "raws.selector.raw", node.selector);
12
13   return (
14     node.type === "rule" &&
15     hasBlock(node) &&
16     selector.slice(0, 2) === "--" &&
17     selector.slice(-1) === ":"
18   );
19 };