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

i18n

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18n - npm Package Compare versions

Comparing version 0.8.6 to 0.9.0

16

i18n.js
/**
* @author Created by Marcus Spiegel <marcus.spiegel@gmail.com> on 2011-03-25.
* @author Created by Marcus Spiegel <spiegel@uscreen.de> on 2011-03-25.
* @link https://github.com/mashpie/i18n-node
* @license http://opensource.org/licenses/MIT
*
* @version 0.8.3
*/

@@ -13,2 +11,3 @@

var vsprintf = require('sprintf-js').vsprintf,
pkgVersion = require('./package.json').version,
fs = require('fs'),

@@ -25,3 +24,2 @@ url = require('url'),

// exports an instance

@@ -69,3 +67,3 @@ module.exports = (function() {

i18n.version = '0.8.3';
i18n.version = pkgVersion;

@@ -332,3 +330,3 @@ i18n.configure = function i18nConfigure(opt) {

// some template engines pass all values as strings -> so we try to convert them to numbers
if (typeof plural === 'number' || parseInt(plural, 10) + '' === plural) {
if (typeof plural === 'number' || Number(plural) + '' === plural) {
count = plural;

@@ -344,3 +342,3 @@ }

// called like __n('cat', 3)
if (typeof plural === 'number' || parseInt(plural, 10) + '' === plural) {
if (typeof plural === 'number' || Number(plural) + '' === plural) {
count = plural;

@@ -365,3 +363,3 @@

// enforce number
count = parseInt(count, 10);
count = Number(count);

@@ -546,3 +544,3 @@ // find the correct plural rule for given locale

if (typeof count === 'number') {
msg = vsprintf(msg, [parseInt(count, 10)]);
msg = vsprintf(msg, [Number(count)]);
}

@@ -549,0 +547,0 @@

{
"name": "i18n",
"description": "lightweight translation module with dynamic json storage",
"version": "0.8.6",
"version": "0.9.0",
"homepage": "http://github.com/mashpie/i18n-node",

@@ -6,0 +6,0 @@ "repository": {

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