A very simple and fast Less Symbols parser.
$ npm i -S less-symbols-parser
Primarily, this module is designed to work with vscode-less extension.
- Dependencies free.
- Returns document Variables, Mixins and Imports.
- Very fast.
const symbolsParser = require('less-symbols-parser');
const symbols = symbolsParser.parseSymbols('@a: 1;');
// console.log(symbols);
// {
// variables: [ { name: '@a', value: '1', offset: 0 } ],
// mixins: [],
// imports: []
// }
variable
- name:
string
- value:
string
- offset:
number
mixin
- name:
string
- parameters:
variable[]
- offset:
number
import
- filepath:
string
- modes:
string[]
- dynamic:
boolean
(filepath contains@
,{
or}
) - css:
boolean
(filepath containscss
extension or mode)
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.