"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/core/src/render3/util/misc_utils.ts" between
angular-11.0.1.tar.gz and angular-11.0.2.tar.gz

About: Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript.

misc_utils.ts  (angular-11.0.1):misc_utils.ts  (angular-11.0.2)
/** /**
* @license * @license
* Copyright Google LLC All Rights Reserved. * Copyright Google LLC All Rights Reserved.
* *
* Use of this source code is governed by an MIT-style license that can be * Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {global} from '../../util/global'; import {global} from '../../util/global';
import {RElement} from '../interfaces/renderer'; import {RElement} from '../interfaces/renderer_dom';
/**
* Used for stringify render output in Ivy.
* Important! This function is very performance-sensitive and we should
* be extra careful not to introduce megamorphic reads in it.
*/
export function renderStringify(value: any): string {
if (typeof value === 'string') return value;
if (value == null) return '';
return '' + value;
}
/**
* Used to stringify a value so that it can be displayed in an error message.
* Important! This function contains a megamorphic read and should only be
* used for error messages.
*/
export function stringifyForError(value: any): string {
if (typeof value === 'function') return value.name || value.toString();
if (typeof value === 'object' && value != null && typeof value.type === 'funct
ion') {
return value.type.name || value.type.toString();
}
return renderStringify(value);
}
export const defaultScheduler = export const defaultScheduler =
(() => ( (() => (
typeof requestAnimationFrame !== 'undefined' && typeof requestAnimationFrame !== 'undefined' &&
requestAnimationFrame || // browser only requestAnimationFrame || // browser only
setTimeout // everything else setTimeout // everything else
) )
.bind(global))(); .bind(global))();
/** /**
 End of changes. 1 change blocks. 
27 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)