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

factorial-i18n

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

factorial-i18n - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

.rpt2_cache/rpt2_5ba94b03cb11b466f2104fb7b915191662459119/code/cache/e6c3db4bf4e678ea98e6a8c467630f00e080268f

8

lib/index.js

@@ -7,3 +7,4 @@ 'use strict';

var at = require('lodash.at');
var at = require('lodash/at');
var isEmpty = require('lodash/isEmpty');
var I18n = /** @class */ (function () {

@@ -29,2 +30,5 @@ function I18n() {

I18n.prototype.getKey = function (path) {
if (isEmpty(this.translations)) {
throw new Error('Translations have not been loaded');
}
return at(this.translations[this.locale], path)[0];

@@ -44,3 +48,3 @@ };

if (typeof value !== 'string') {
throw new Error("Key \"" + path + "\"is not a leaf");
throw new Error("Key \"" + path + "\" is not a leaf");
}

@@ -47,0 +51,0 @@ var MATCH = /%\{([^}]+)\}/g;

{
"name": "factorial-i18n",
"version": "0.2.0",
"version": "0.3.0",
"description": "Factorial i18n library",

@@ -12,3 +12,3 @@ "repository": {

"dependencies": {
"lodash.at": "4.6.0",
"lodash": "^4.17.15",
"plurals-cldr": "1.0.3"

@@ -15,0 +15,0 @@ },

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