chore: run updated prettier

This commit is contained in:
Evan You
2021-07-19 18:24:18 -04:00
parent 69344ff1ae
commit 47f488350c
110 changed files with 695 additions and 698 deletions

View File

@@ -113,11 +113,9 @@ const camelizeRE = /-(\w)/g
/**
* @private
*/
export const camelize = cacheStringFunction(
(str: string): string => {
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
}
)
export const camelize = cacheStringFunction((str: string): string => {
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''))
})
const hyphenateRE = /\B([A-Z])/g
/**
@@ -137,8 +135,8 @@ export const capitalize = cacheStringFunction(
/**
* @private
*/
export const toHandlerKey = cacheStringFunction(
(str: string) => (str ? `on${capitalize(str)}` : ``)
export const toHandlerKey = cacheStringFunction((str: string) =>
str ? `on${capitalize(str)}` : ``
)
// compare whether a value has changed, accounting for NaN.
@@ -172,11 +170,11 @@ export const getGlobalThis = (): any => {
typeof globalThis !== 'undefined'
? globalThis
: typeof self !== 'undefined'
? self
: typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {})
? self
: typeof window !== 'undefined'
? window
: typeof global !== 'undefined'
? global
: {})
)
}

View File

@@ -8,8 +8,8 @@ export const toDisplayString = (val: unknown): string => {
return val == null
? ''
: isObject(val)
? JSON.stringify(val, replacer, 2)
: String(val)
? JSON.stringify(val, replacer, 2)
: String(val)
}
const replacer = (_key: string, val: any) => {