chore: run updated prettier
This commit is contained in:
@@ -54,27 +54,27 @@ describe('utils/looseEqual', () => {
|
||||
const date2 = new Date(2019, 1, 2, 3, 4, 5, 7)
|
||||
const file1 = new File([''], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
const file2 = new File([''], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
const file3 = new File([''], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date2.getTime(),
|
||||
lastModified: date2.getTime()
|
||||
})
|
||||
const file4 = new File([''], 'filename.csv', {
|
||||
type: 'text/csv',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
const file5 = new File(['abcdef'], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
const file6 = new File(['12345'], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
|
||||
// Identical file object references
|
||||
@@ -163,7 +163,7 @@ describe('utils/looseEqual', () => {
|
||||
const date1 = new Date(2019, 1, 2, 3, 4, 5, 6)
|
||||
const file1 = new File([''], 'filename.txt', {
|
||||
type: 'text/plain',
|
||||
lastModified: date1.getTime(),
|
||||
lastModified: date1.getTime()
|
||||
})
|
||||
|
||||
expect(looseEqual(123, '123')).toBe(true)
|
||||
|
||||
@@ -6,7 +6,9 @@ describe('normalizeClass', () => {
|
||||
})
|
||||
|
||||
test('handles array correctly', () => {
|
||||
expect(normalizeClass(['foo', undefined, true, false, 'bar'])).toEqual('foo bar')
|
||||
expect(normalizeClass(['foo', undefined, true, false, 'bar'])).toEqual(
|
||||
'foo bar'
|
||||
)
|
||||
})
|
||||
|
||||
test('handles object correctly', () => {
|
||||
|
||||
@@ -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
|
||||
: {})
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user