semanticdb-core 1.1.48 → 1.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -157,7 +157,7 @@ const explainNegatedComparedValue = (key, value, schemas) => {
157
157
  }
158
158
  const [operator, operatorValue] = entries[0];
159
159
  if (operator === '$eq') {
160
- return `${key} != ${stringifyExplainValue(operatorValue, schemas)}`;
160
+ return `${key} 不等于 ${stringifyExplainValue(operatorValue, schemas)}`;
161
161
  }
162
162
  if (operator === '$gt') {
163
163
  return `${key} <= ${stringifyExplainValue(operatorValue, schemas)}`;
@@ -199,7 +199,7 @@ const explainComparedValue = (key, value, schemas) => {
199
199
  if (isCompareOperatorObject(operatorValue)) {
200
200
  return explainNegatedComparedValue(key, operatorValue, schemas);
201
201
  }
202
- return `${key} != ${stringifyExplainValue(operatorValue, schemas)}`;
202
+ return `${key} 不等于 ${stringifyExplainValue(operatorValue, schemas)}`;
203
203
  }
204
204
  return explainSingleComparedValue(key, operator, operatorValue, schemas);
205
205
  });
@@ -141,7 +141,7 @@ try {
141
141
  catch (e) {
142
142
  // ignore
143
143
  }
144
- // 国外的缩略,分为:个位数、kmb,四个等级
144
+ // 国外的缩略,分为:个位数、KMB,四个等级
145
145
  try {
146
146
  numeral_1.default.register('format', 'engabbreviation', {
147
147
  regexps: {
@@ -160,15 +160,15 @@ try {
160
160
  }
161
161
  else if (abs < million) {
162
162
  adjValue = value / thousand;
163
- unit = 'k';
163
+ unit = 'K';
164
164
  }
165
165
  else if (abs < billion) {
166
166
  adjValue = value / million;
167
- unit = 'm';
167
+ unit = 'M';
168
168
  }
169
169
  else {
170
170
  adjValue = value / billion;
171
- unit = 'b';
171
+ unit = 'B';
172
172
  }
173
173
  return numeral_1.default._.numberToFormat(adjValue, format.substring(0, format.length - 1), roundingFunction) + unit;
174
174
  },
@@ -178,15 +178,15 @@ try {
178
178
  const billion = 1000000000.0; // 十亿
179
179
  let scale = 1.0;
180
180
  let numberString = string;
181
- if (string.endsWith('k')) {
181
+ if (string.endsWith('k') || string.endsWith('K')) {
182
182
  scale = thousand;
183
183
  numberString = string.substring(0, string.length - 1);
184
184
  }
185
- else if (string.endsWith('m')) {
185
+ else if (string.endsWith('m') || string.endsWith('M')) {
186
186
  scale = million;
187
187
  numberString = string.substring(0, string.length - 1);
188
188
  }
189
- else if (string.endsWith('b')) {
189
+ else if (string.endsWith('b') || string.endsWith('B')) {
190
190
  scale = billion;
191
191
  numberString = string.substring(0, string.length - 1);
192
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.1.48",
3
+ "version": "1.1.50",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [