# @snowfallorg/sleet

> A parser for Nix.

Latest version **0.12.4** (published 2023-11-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @snowfallorg/sleet
pnpm add @snowfallorg/sleet
yarn add @snowfallorg/sleet
bun add @snowfallorg/sleet
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.4 |
| Published | 2023-11-11 |
| First published | 2023-07-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 86.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Jake Hamilton |
| Maintainers | jakehamilton |
| Keywords | nix, parser |

## Links

- npm: https://www.npmjs.com/package/@snowfallorg/sleet
- Repository: https://github.com/snowfallorg/sleet
- Homepage: https://github.com/snowfallorg/sleet#readme
- Issues: https://github.com/snowfallorg/sleet/issues
- npm.io page: https://npm.io/package/@snowfallorg/sleet

## 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.12.4 (latest) — 2023-11-11
- 0.12.3 — 2023-11-11
- 0.12.2 — 2023-11-11
- 0.12.1 — 2023-11-11
- 0.12.0 — 2023-07-09
- 0.11.0 — 2023-07-09
- 0.10.0 — 2023-07-05
- 0.9.0 — 2023-07-05
- 0.8.0 — 2023-07-05
- 0.7.0 — 2023-07-05
- 0.6.0 — 2023-07-05
- 0.5.0 — 2023-07-05
- 0.4.0 — 2023-07-04
- 0.3.0 — 2023-07-04
- 0.2.0 — 2023-07-04
- … 2 more at https://npm.io/package/@snowfallorg/sleet/versions

## README

# Snowfall Sleet

<a href="https://nixos.wiki/wiki/Flakes" target="_blank">
	<img alt="Nix Flakes Ready" src="https://img.shields.io/static/v1?logo=nixos&logoColor=d8dee9&label=Nix%20Flakes&labelColor=5e81ac&message=Ready&color=d8dee9&style=for-the-badge">
</a>
<a href="https://github.com/snowfallorg/lib" target="_blank">
	<img alt="Built With Snowfall" src="https://img.shields.io/static/v1?label=Built%20With&labelColor=5e81ac&message=Snowfall&color=d8dee9&style=for-the-badge">
</a>

<p>
<!--
	This paragraph is not empty, it contains an em space (UTF-8 8195) on the next line in order
	to create a gap in the page.
-->
  
</p>

> A Nix parser written in TypeScript.

## Usage

### Lexer

To use the lexer, import the `Lexer` class and create a new instance.

```ts
import { Lexer } from "@snowfallorg/sleet";

const lexer = new Lexer();

const tokens = lexer.lex("let x = 4; in x");
```

### Parser

To use the parser, import the `Parser` class and create a new instance.

```ts
import { Parser } from "@snowfallorg/sleet";

const parser = new Parser();

const ast = parser.parse("let x = 4; in x");
```

## Implementation

This parser is not resilient. On any malformed input, Sleet will throw an error. This
may change in the future, but for now you should know that resilient parsing is not
a part of this library.

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