@selective/parse
v0.3.0
Published
Parse selective configuration files into JSON
Downloads
6
Maintainers
Readme
Converts selective's css-like domain specific language to a list of JSON rules
Installation
# npm
npm install @selective/parse
# yarn
yarn add @selective/parse
Usage
const parse = require("@selective/parse");
const rules = parse(
".test {name: 'test-name'; description: 'test description'; recommended: warn}"
);
console.log(rules);
// [
// {
// name: "test-name",
// description: "test description",
// recommended: "warn",
// selector: ".test"
// }
// ]