MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / equals

Function equals

packages/core/ui/styling/font-common.ts:44–56  ·  view source on GitHub ↗
(value1: Font, value2: Font)

Source from the content-addressed store, hash-verified

42 public abstract withFontVariationSettings(variationSettings: FontVariationSettingsType[]): Font;
43
44 public static equals(value1: Font, value2: Font): boolean {
45 // both values are falsy
46 if (!value1 && !value2) {
47 return true;
48 }
49
50 // only one is falsy
51 if (!value1 || !value2) {
52 return false;
53 }
54
55 return value1.fontFamily === value2.fontFamily && value1.fontSize === value2.fontSize && value1.fontStyle === value2.fontStyle && value1.fontWeight === value2.fontWeight && value1.fontScale === value2.fontScale && FontVariationSettings.toString(value1.fontVariationSettings) === FontVariationSettings.toString(value2.fontVariationSettings);
56 }
57}
58
59export namespace FontStyle {

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected