Socket
Socket
Sign inDemoInstall

cordova-plugin-localization-strings

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-localization-strings - npm Package Compare versions

Comparing version 5.0.5 to 5.0.6

2

package.json
{
"name": "cordova-plugin-localization-strings",
"version": "5.0.5",
"version": "5.0.6",
"description": "Cordova Plugin for handling localization strings on InfoPlist.strings and Localizable.strings on iOS, strings.xml on Android",

@@ -5,0 +5,0 @@ "keywords": [

@@ -20,9 +20,19 @@ var fs = require("fs");

function getProjectName() {
// Valid matches
// '<name>Application one</name>',
// '<name short="App1">Application one</name>',
// '<name xmlns:widget="http://www.w3.org/ns/widgets">Application one</name>',
// '<name >Application one</name>',
// `<name
// >Application one</name>`,
//
// Invalid matches
// '<name2>Application one</name>',
// '<namefoo>Application one</name>',
// '<name!!>Application one</name>',
const regExpression = "<name(?=[\\s>])[^>]*>(.*?)</name>";
var config = fs.readFileSync("config.xml").toString();
var matches = config.match(new RegExp("<name>(.*?)</name>", "i"));
var matches = config.match(new RegExp(regExpression, "i"));
// if simple name-tag not found then try optional form of name tag with short name
if (!matches)
matches = config.match(new RegExp('<name short=".*?">(.*?)</name>', "i"));
return (matches && matches[1]) || null;

@@ -29,0 +39,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