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

linkmore-intl-generator

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkmore-intl-generator - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

11

dist/index.js

@@ -82,5 +82,11 @@ "use strict";

const toHump = (name) => {
return name.replace(/[^a-zA-Z0-9 ]/g, '').replace(/( +)(\w)/g, (all) => {
const _name = name.replace(/[^a-zA-Z0-9 ]/g, '').replace(/( +)(\w)/g, (all) => {
return all.trim().toUpperCase();
});
// 中文开头, 将中文移动到末尾
if (/^\d+/.test(_name)) {
const num = /^\d+/.exec(_name);
return _name.replace(`${num}`, '') + num;
}
return _name;
};

@@ -96,3 +102,3 @@ const result = {};

result[id] = {
id: toHump(englishList[index]),
id,
defaultMessage: text,

@@ -289,2 +295,3 @@ description: this.options.description,

// const filepath = path.resolve(process.cwd(), './Table/**/*.ts(x)?');
// const filepath = path.resolve(process.cwd(), './1.tsx');
// const configPath = path.resolve(process.cwd(), './common.ts');

@@ -291,0 +298,0 @@ // const util = new GenerateIntl({

2

package.json
{
"name": "linkmore-intl-generator",
"version": "0.0.4",
"version": "0.0.5",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -110,5 +110,11 @@ import fs from 'fs';

const toHump = (name: string) => {
return name.replace(/[^a-zA-Z0-9 ]/g, '').replace(/( +)(\w)/g, (all) => {
const _name = name.replace(/[^a-zA-Z0-9 ]/g, '').replace(/( +)(\w)/g, (all) => {
return all.trim().toUpperCase();
});
// 中文开头, 将中文移动到末尾
if (/^\d+/.test(_name)) {
const num = /^\d+/.exec(_name)
return _name.replace(`${num}`, '') + num
}
return _name
};

@@ -126,3 +132,3 @@

result[id] = {
id: toHump(englishList[index]),
id,
defaultMessage: text,

@@ -338,2 +344,3 @@ description: this.options.description,

// const filepath = path.resolve(process.cwd(), './Table/**/*.ts(x)?');
// const filepath = path.resolve(process.cwd(), './1.tsx');

@@ -340,0 +347,0 @@ // const configPath = path.resolve(process.cwd(), './common.ts');

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