You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@fluent/syntax

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluent/syntax

AST and parser for Fluent

0.19.0
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

@fluent/syntax

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

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

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.

Keywords

localization

FAQs

Package last updated on 13 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts