Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -16,7 +16,7 @@ export function clone<T>(obj: T): T {
return obj as any;
}
const result = (Array.isArray(obj)) ? <any>[] : <any>{};
Object.keys(obj).forEach((key) => {
Object.keys(obj).forEach(key => {
if (obj[key] && typeof obj[key] === 'object') {
result[key] = clone(obj[key]);
} else {
@@ -31,7 +31,7 @@ export function deepClone<T>(obj: T): T {
return obj;
}
const result = (Array.isArray(obj)) ? <any>[] : <any>{};
Object.getOwnPropertyNames(obj).forEach((key) => {
Object.getOwnPropertyNames(obj).forEach(key => {
if (obj[key] && typeof obj[key] === 'object') {
result[key] = deepClone(obj[key]);
} else {
@@ -93,7 +93,7 @@ export function mixin(destination: any, source: any, overwrite: boolean = true):
}
if (isObject(source)) {
Object.keys(source).forEach((key) => {
Object.keys(source).forEach(key => {
if (key in destination) {
if (overwrite) {
if (isObject(destination[key]) && isObject(source[key])) {
@@ -111,7 +111,7 @@ export function mixin(destination: any, source: any, overwrite: boolean = true):
}
export function assign(destination: any, ...sources: any[]): any {
sources.forEach(source => Object.keys(source).forEach((key) => destination[key] = source[key]));
sources.forEach(source => Object.keys(source).forEach(key => destination[key] = source[key]));
return destination;
}