Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluent-syntax

Package Overview
Dependencies
Maintainers
3
Versions
20
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.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by66.83%
Maintainers
3
Weekly downloads
 
Created
Source

fluent-syntax

fluent-syntax is a parser for Fluent translation files, FTL. Project Fluent is a localization framework designed to unleash the expressive power of the natural language.

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 http://projectfluent.org/fluent.js/fluent-syntax.

Compatibility

For legacy browsers, the compat build has been transpiled using Babel's env preset:

import 'fluent-syntax/compat';

Learn more

Find out more about Project Fluent at projectfluent.org, including documentation of the Fluent file format (FTL), links to other packages and implementations, and information about how to get involved.

Keywords

FAQs

Package last updated on 17 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc