This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
tacnoman-scss-tokenizer with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
A tokenizer for Sass' SCSS syntax
npm install scss-tokenizer
var scss = require('scss-tokenizer'); scss.tokenize(css);
css and returns an ordered array of tokens with positional
var tokenizer = require('scss-tokenizer'); var tokens = tokenize.tokenize(css);
css (string|#toString): String with input CSS or any object with
toString()method, like file stream.
opts (object) optional: options:
from: the path to the source CSS file. You should always set
from, because it is used in map generation and in syntax error messages.
This project started as a fork of the PostCSS tokenizer.