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

i18next-print-keys

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-print-keys - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ignore = ['defaultValue', 'interpolation', 'lng', 'lngs', 'ns'];
exports.default = {

@@ -7,4 +8,5 @@ name: 'printKeys',

process(_, key, options) {
return Object.keys(options).length
? key + ' ' + JSON.stringify(options)
const optionKeys = Object.keys(options).filter((key) => !ignore.includes(key));
return optionKeys.length
? key + ' ' + JSON.stringify(options, optionKeys)
: key.toString();

@@ -11,0 +13,0 @@ },

{
"name": "i18next-print-keys",
"version": "1.0.1",
"version": "1.0.2",
"description": "i18next preprocessor to print translation keys including interpolated values.",

@@ -5,0 +5,0 @@ "author": "Widen",

import { PostProcessorModule } from 'i18next'
const ignore = ['defaultValue', 'interpolation', 'lng', 'lngs', 'ns']
export default {

@@ -7,6 +9,13 @@ name: 'printKeys',

process(_, key, options) {
return Object.keys(options).length
? key + ' ' + JSON.stringify(options)
// Filter out internal i18next options when printing keys. The resulting
// array is passed to JSON.stringify which instructs it which keys should
// be printed.
const optionKeys = Object.keys(options).filter(
(key) => !ignore.includes(key)
)
return optionKeys.length
? key + ' ' + JSON.stringify(options, optionKeys)
: key.toString()
},
} as PostProcessorModule

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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