# @fluent/syntax

> AST and parser for Fluent

Latest version **0.19.0** (published 2023-03-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @fluent/syntax
pnpm add @fluent/syntax
yarn add @fluent/syntax
bun add @fluent/syntax
```

## Health

**Score 40/100 (D)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.19.0 |
| Published | 2023-03-13 |
| First published | 2019-07-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 0 |
| Unpacked size | 147.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1009 |
| Author | Mozilla |
| Maintainers | eemeli, zbraniecki, tatumcreative, flod |
| Keywords | localization, l10n, internationalization, i18n, ftl, plural, gender, locale, language, formatting, translate, translation, format, ast, serializer, parser |

## Links

- npm: https://www.npmjs.com/package/@fluent/syntax
- Repository: https://github.com/projectfluent/fluent.js
- Homepage: https://projectfluent.org
- Issues: https://github.com/projectfluent/fluent.js/issues
- npm.io page: https://npm.io/package/@fluent/syntax

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 0.19.0 (latest) — 2023-03-13
- 0.18.1 — 2022-05-03
- 0.18.0 — 2021-09-13
- 0.17.0 — 2021-04-09
- 0.16.1 — 2020-09-15
- 0.16.0 — 2020-07-02
- 0.15.0 — 2020-03-02
- 0.14.0 — 2019-07-25

## README

# @fluent/syntax ![](https://github.com/projectfluent/fluent.js/workflows/test/badge.svg)

`@fluent/syntax` is a tooling library for parsing, serializing, and working
with the Fluent syntax. It's part of [Project Fluent][].

[project fluent]: https://projectfluent.org

## Installation

`@fluent/syntax` can be used both on the client-side and the server-side. You
can install it from the npm registry or use it as a standalone script (as the
`FluentSyntax` global).

    npm install @fluent/syntax

## How to use

```javascript
import { parse, Resource } from "@fluent/syntax";

const res = parse(`
-brand-name = Foo 3000
welcome = Welcome, {$name}, to {-brand-name}!
`);

assert(res instanceof Resource);
```

The API reference is available at https://projectfluent.org/fluent.js/syntax.

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