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

kmore

Package Overview
Dependencies
Maintainers
1
Versions
272
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmore - npm Package Compare versions

Comparing version 51.2.3 to 51.3.0

38

dist/lib/kmore.js

@@ -231,9 +231,41 @@ /* eslint-disable max-lines-per-function */

}
const fnKeys = [
'CASE',
'WHEN',
'THEN',
'ELSE',
'ELS',
'END',
];
function defaultGlobalWrapIdentifier(value, origImpl) {
const ret = origImpl(value);
if (value === '' && ret === '``') {
const dem2 = '\'';
// original IFNULL(user.distotal, 0) as foo
// from: IFNULL(user => input: `IFNULL(user` fix to 'IFNULL(user
// from: distotal, 0) => input: `distotal, 0)` fix to distotal, 0)'
if (value.includes('(')) {
const line = dem2 + value;
return line;
}
if (value.includes(')')) {
const line = value + dem2;
return line;
}
const upper = value.toUpperCase().trim();
const matched = fnKeys.find(key => upper.includes(key));
if (matched) {
if (upper.startsWith('CASE ')) {
const line = dem2 + value;
return line;
}
if (upper.endsWith(' END')) {
const line = value + dem2;
return line;
}
}
const line = origImpl(value);
if (value === '' && line === '``') {
return '\'\'';
}
return ret;
return line;
}
//# sourceMappingURL=kmore.js.map

4

package.json
{
"name": "kmore",
"author": "waiting",
"version": "51.2.3",
"version": "51.3.0",
"description": "A SQL query builder based on knex with powerful TypeScript type support",

@@ -81,3 +81,3 @@ "keywords": [

},
"gitHead": "6987fbe9ca5825c8ea6601952850302412b41a11"
"gitHead": "1a104dd685dedb80b937174699b94b5bc14e2282"
}

@@ -326,9 +326,47 @@ /* eslint-disable max-lines-per-function */

const fnKeys = [
'CASE',
'WHEN',
'THEN',
'ELSE',
'ELS',
'END',
]
function defaultGlobalWrapIdentifier(value: string, origImpl: (input: string) => string) {
const ret = origImpl(value)
if (value === '' && ret === '``') {
const dem2 = '\''
// original IFNULL(user.distotal, 0) as foo
// from: IFNULL(user => input: `IFNULL(user` fix to 'IFNULL(user
// from: distotal, 0) => input: `distotal, 0)` fix to distotal, 0)'
if (value.includes('(')) {
const line = dem2 + value
return line
}
if (value.includes(')')) {
const line = value + dem2
return line
}
const upper = value.toUpperCase().trim()
const matched = fnKeys.find(key => upper.includes(key))
if (matched) {
if (upper.startsWith('CASE ')) {
const line = dem2 + value
return line
}
if (upper.endsWith(' END')) {
const line = value + dem2
return line
}
}
const line = origImpl(value)
if (value === '' && line === '``') {
return '\'\''
}
return ret
return line
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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