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

@sveltekit-i18n/parser-default

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sveltekit-i18n/parser-default - npm Package Compare versions

Comparing version 1.0.0-beta.2 to 1.0.0-beta.3

10

dist/index.d.ts

@@ -0,1 +1,3 @@

import { Parse } from '@sveltekit-i18n/base';
type ModifierOption = Record<'key' | 'value', string>;

@@ -12,9 +14,3 @@

type Parser = (options: ParserOptions) => {
parse: (props: {
translations: Record<string, Record<string, any>>;
key: string;
payload?: Record<any, any>;
locale?: string;
fallbackLocale?: string;
}) => string
parse: Parse<Record<any | 'default', any>>;
};

@@ -21,0 +17,0 @@

{
"name": "@sveltekit-i18n/parser-default",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Default parser for sveltekit-i18n library.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -1,2 +0,2 @@

[![npm version](https://badge.fury.io/js/@sveltekit-i18n%2Fparser-default.svg)](https://badge.fury.io/js/@sveltekit-i18n%2Fparser-default) ![](https://github.com/sveltekit-i18n/parsers/workflows/Tests/badge.svg)
[![npm version](https://badge.fury.io/js/@sveltekit-i18n%2Fparser-default.svg)](https://badge.fury.io/js/@sveltekit-i18n%2Fparser-default) ![](https://github.com/sveltekit-i18n/parsers/workflows/Tests/badge.svg) [![Tests](https://github.com/sveltekit-i18n/parsers/actions/workflows/tests-parser-default.yml/badge.svg)](https://github.com/sveltekit-i18n/parsers/actions/workflows/tests-parser-default.yml)

@@ -26,7 +26,6 @@ # @sveltekit-i18n/parser-default

## Message format
## Syntax
Your translations should be formatted as dot-notated objects containing strings as translation values. You can use `placehoders` and `modifiers` for interpolation.
Example:
Every [placeholder](#placeholders) or [modifiers](#modifiers) starts with `{{` and ends with `}}` and can be included in your translations like this:
```jsonc

@@ -67,3 +66,3 @@ {

```
This value is used in case no `default` value is defined within the placeholder definition itself. For more, see `Dynamic default` section in [custom-modifiers](https://github.com/sveltekit-i18n/lib/tree/master/examples/custom-modifiers) example.
This value is used in case no `default` value is defined within the placeholder definition itself. For more, see `Dynamic default` section in [parser-default](https://github.com/sveltekit-i18n/lib/tree/master/examples/parser-default) example.

@@ -92,3 +91,3 @@ ### Modifiers

You can include your own modifiers in the [Config](#custommodifiers-recordstring-value-string-options-arraykey-string-value-string-defaultvalue-string--string)! See [Examples](https://github.com/sveltekit-i18n/lib/tree/master/examples).
You can include your own modifiers in [Options](#options)! See `parser-default` example in [Examples](https://github.com/sveltekit-i18n/lib/tree/master/examples).

@@ -95,0 +94,0 @@

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