🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
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
npm
Version published
Weekly downloads
149K
4.98%
Maintainers
4
Weekly downloads
 
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