MCPcopy Create free account
hub / github.com/UI5/webcomponents / checkNumericLike

Function checkNumericLike

packages/localization/src/dates/CalendarDate.ts:227–231  ·  view source on GitHub ↗

* Verifies the given value is numeric like, i.e. 3, "3" and throws an error if it is not. * @param {any} value The value of any type to check. If null or undefined, this method throws an error. * @param {string} message The message to be used if an error is to be thrown * @throws will throw an er

(value: any, message: string)

Source from the content-addressed store, hash-verified

225 * @throws will throw an error if the value is null or undefined or is not like a number
226 */
227function checkNumericLike(value: any, message: string) {
228 if (value === undefined || value === Infinity || isNaN(value)) { // eslint-disable-line
229 throw message;
230 }
231}
232
233export default CalendarDate;

Callers 4

constructorMethod · 0.85
setYearMethod · 0.85
setMonthMethod · 0.85
setDateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…