mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 17:22:25 -05:00
Remove logging and clone utlities (#5309)
* remove log utility functions; remove custom mixin * fix tests * add log service as required by telemetry utils * remove unused code * replace some console.logs with logservice
This commit is contained in:
@@ -5,25 +5,6 @@
|
||||
|
||||
import * as Types from 'vs/base/common/types';
|
||||
|
||||
export function clone<T>(obj: T): T {
|
||||
if (!obj || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
if (obj instanceof RegExp) {
|
||||
// See https://github.com/Microsoft/TypeScript/issues/10990
|
||||
return obj as any;
|
||||
}
|
||||
const result = (Array.isArray(obj)) ? <any>[] : <any>{};
|
||||
Object.keys(obj).forEach(key => {
|
||||
if (obj[key] && typeof obj[key] === 'object') {
|
||||
result[key] = clone(obj[key]);
|
||||
} else {
|
||||
result[key] = obj[key];
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A copy of the vs mixin that accepts a custom behavior function
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user