mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 12:35:59 +00:00
web-svelte => web
This commit is contained in:
7
packages/web/src/utility/getAsArray.ts
Normal file
7
packages/web/src/utility/getAsArray.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
|
||||
export default function getAsArray(obj) {
|
||||
if (_.isArray(obj)) return obj;
|
||||
if (obj != null) return [obj];
|
||||
return [];
|
||||
}
|
||||
Reference in New Issue
Block a user