New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fluent-transpiler

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-transpiler - npm Package Compare versions

Comparing version

to
0.2.0

13

index.js

@@ -71,4 +71,11 @@ import { parse } from '@fluent/syntax'

const types = {
Identifier: (data) => {
const value = variableNotation[options.variableNotation](data.name)
Identifier: (data, parent) => {
const value =
parent === 'Attribute'
? data.name
: variableNotation[options.variableNotation](data.name)
if (value.includes('-')) {
return `'${value}'`
}
// Check for reserved words - TODO add in rest

@@ -81,3 +88,3 @@ if (['const', 'default', 'enum', 'if'].includes(value)) {

Attribute: (data) => {
const key = compileType(data.id)
const key = compileType(data.id, data.type)
const value = compileType(data.value, data.type)

@@ -84,0 +91,0 @@ return ` ${key}: ${value}`

{
"name": "fluent-transpiler",
"version": "0.1.3",
"version": "0.2.0",
"description": "Transpile Fluent (ftl) files into optimized, tree-shakable, JavaScript EcmaScript Modules (esm).",

@@ -5,0 +5,0 @@ "main": "index.js",