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

js-gettext

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

js-gettext - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

src/__tests__/read-parameters-test.js

16

package.json
{
"name": "js-gettext",
"version": "1.0.7",
"version": "1.1.0",
"description": "gettext alternative for js",

@@ -9,3 +9,3 @@ "main": "./src/index.js",

"scripts": {
"test": "ava tests",
"test": "jest",
"precommit": "lint-staged"

@@ -17,10 +17,12 @@ },

"dependencies": {
"commander": "^2.15.1",
"commander": "^4.1.1",
"glob": "^7.1.2"
},
"devDependencies": {
"ava": "^0.25.0",
"eslint": "^4.19.1",
"husky": "^0.14.3",
"lint-staged": "^7.0.0",
"@types/jest": "^25.1.1",
"eslint": "^6.8.0",
"eslint-plugin-jest": "^23.6.0",
"husky": "^4.2.1",
"jest": "^25.1.0",
"lint-staged": "^10.0.7",
"prettier": "^1.11.1"

@@ -27,0 +29,0 @@ },

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

// @ts-check
const {readFileSync, statSync} = require('fs');

@@ -6,4 +7,9 @@ const glob = require('glob');

const currentDir = process.cwd();
const addToken = (tokens, filename, line, token, tokenPlural = '') => {
const key = token;
const relativePath = filename.startsWith(currentDir)
? '.' + filename.substr(currentDir.length)
: filename;
if (!tokens[key]) {

@@ -13,6 +19,6 @@ tokens[key] = {

plural: tokenPlural,
positions: [`${filename}:${line}`],
positions: [`${relativePath}:${line}`],
};
} else {
tokens[key].positions.push(`${filename}:${line}`);
tokens[key].positions.push(`${relativePath}:${line}`);
const currentPlural = tokens[key].tokenPlural;

@@ -19,0 +25,0 @@ if (tokenPlural) {

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

// @ts-check
/**

@@ -2,0 +3,0 @@ * JSON formatter

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

// @ts-check
/**

@@ -2,0 +3,0 @@ * gettext formatter

#!/usr/bin/env node
// @ts-check
const {writeFileSync} = require('fs');

@@ -22,4 +23,3 @@ const argv = require('commander');

argv
.version(require('../package').version)
argv.version(require('../package').version)
.arguments('<input> <output>')

@@ -26,0 +26,0 @@ .option('-f, --format <value>', 'Output format (pot|json)', /^(pot|json)$/, 'pot')

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

// @ts-check
/**

@@ -2,0 +3,0 @@ * Simple state machine to read up to `limit` string parameters

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

// @ts-check
/**

@@ -2,0 +3,0 @@ * Creates a RegExp that matches a function call in the beginning of the string,

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