mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
feat(plugin-aws-cloud-explorer): CB-830 select all select only visible nodes now
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* CloudBeaver - Cloud Database Manager
|
||||
* Copyright (C) 2020-2021 DBeaver Corp and others
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0.
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
export function declensionOfNumber(value: number, words: string[]) {
|
||||
value = Math.abs(value) % 100;
|
||||
const num = value % 10;
|
||||
if (value > 10 && value < 20) {
|
||||
return words[2];
|
||||
}
|
||||
|
||||
if (num > 1 && num < 5) {
|
||||
return words[1];
|
||||
}
|
||||
|
||||
if (num === 1) {
|
||||
return words[0];
|
||||
}
|
||||
|
||||
return words[2];
|
||||
}
|
||||
@@ -7,6 +7,7 @@ export * from './generateFileName';
|
||||
export * from './md5';
|
||||
export * from './TextTools';
|
||||
export * from './copyToClipboard';
|
||||
export * from './declensionOfNumber';
|
||||
|
||||
export * from './Promises/CancellablePromise';
|
||||
export * from './Promises/Deferred';
|
||||
|
||||
Reference in New Issue
Block a user