# @lfranklin/scss-tokenizer

> A tokenzier for Sass' SCSS syntax

Latest version **0.2.5** (published 2017-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lfranklin/scss-tokenizer
pnpm add @lfranklin/scss-tokenizer
yarn add @lfranklin/scss-tokenizer
bun add @lfranklin/scss-tokenizer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2017-12-11 |
| First published | 2017-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xzyfer |
| Maintainers | lfranklin |
| Keywords | parser, tokenizer, sass, scss, libsass |

## Links

- npm: https://www.npmjs.com/package/@lfranklin/scss-tokenizer
- Repository: https://github.com/logansgraphicd/scss-tokenizer
- Issues: https://github.com/logansgraphicd/scss-tokenizer/issues
- npm.io page: https://npm.io/package/@lfranklin/scss-tokenizer

## Dependencies (2)

- [js-base64](https://npm.io/package/js-base64.md) ^2.1.8
- [source-map](https://npm.io/package/source-map.md) ^0.4.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.2.5 (latest) — 2017-12-11
- 0.2.4 — 2017-12-11

## README

# scss-tokenizer
A tokenzier for Sass' SCSS syntax

![https://travis-ci.org/sasstools/scss-tokenizer.svg?branch=master](https://img.shields.io/travis/sasstools/scss-tokenizer.svg)
![https://www.npmjs.com/package/scss-tokenizer](https://img.shields.io/npm/v/scss-tokenizer.svg)
![https://github.com/sasstools/scss-tokenizer/issues](https://img.shields.io/github/issues/sasstools/scss-tokenizer.svg)
![](https://img.shields.io/github/license/sasstools/scss-tokenizer.svg)

# Install

```
npm install scss-tokenizer
```

# Usage

```js
var scss = require('scss-tokenizer');
scss.tokenize(css);
```

# API

### `tokenize`

Tokenizes source `css` and returns an ordered array of tokens with positional
data.

```js
var tokenizer = require('scss-tokenizer');
var tokens = tokenize.tokenize(css);
```

Arguments:

* `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.

# Test

```
npm test
```

## Attribution

This project started as a fork of the [PostCSS](https://github.com/postcss/postcss) tokenizer.

---
_Source: https://npm.io/package/@lfranklin/scss-tokenizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
