Skip to content

Commit d10b44b

Browse files
committed
Adjust spacing in template string expressions.
1 parent 303502e commit d10b44b

29 files changed

+90
-90
lines changed

.internal/arrayLikeKeys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function arrayLikeKeys(value, inherited) {
2424
const result = new Array(skipIndexes ? length : 0)
2525
let index = skipIndexes ? -1 : length
2626
while (++index < length) {
27-
result[index] = `${ index }`
27+
result[index] = `${index}`
2828
}
2929
for (const key in value) {
3030
if ((inherited || hasOwnProperty.call(value, key)) &&

.internal/baseMerge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function baseMerge(object, source, srcIndex, customizer, stack) {
2727
}
2828
else {
2929
let newValue = customizer
30-
? customizer(object[key], srcValue, `${ key }`, object, source, stack)
30+
? customizer(object[key], srcValue, `${key}`, object, source, stack)
3131
: undefined
3232

3333
if (newValue === undefined) {

.internal/baseMergeDeep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
3636
return
3737
}
3838
let newValue = customizer
39-
? customizer(objValue, srcValue, `${ key }`, object, source, stack)
39+
? customizer(objValue, srcValue, `${key}`, object, source, stack)
4040
: undefined
4141

4242
let isCommon = newValue === undefined

.internal/baseToString.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ function baseToString(value) {
2222
}
2323
if (Array.isArray(value)) {
2424
// Recursively convert values (susceptible to call stack limits).
25-
return `${ value.map(baseToString) }`
25+
return `${value.map(baseToString)}`
2626
}
2727
if (isSymbol(value)) {
2828
return symbolToString ? symbolToString.call(value) : ''
2929
}
30-
const result = `${ value }`
30+
const result = `${value}`
3131
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result
3232
}
3333

.internal/createRound.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ function createRound(methodName) {
1212
if (precision) {
1313
// Shift with exponential notation to avoid floating-point issues.
1414
// See [MDN](https://mdn.io/round#Examples) for more details.
15-
let pair = `${ number }e`.split('e')
16-
const value = func(`${ pair[0] }e${ +pair[1] + precision }`)
15+
let pair = `${number}e`.split('e')
16+
const value = func(`${pair[0]}e${ +pair[1] + precision }`)
1717

18-
pair = `${ value }e`.split('e')
19-
return +`${ pair[0] }e${ +pair[1] - precision }`
18+
pair = `${value}e`.split('e')
19+
return +`${pair[0]}e${+pair[1] - precision}`
2020
}
2121
return func(number)
2222
}

.internal/equalByTag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
7474
// Coerce regexes to strings and treat strings, primitives and objects,
7575
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
7676
// for more details.
77-
return object == `${ other }`
77+
return object == `${other}`
7878

7979
case mapTag:
8080
let convert = mapToArray

.internal/getTag.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const setTag = '[object Set]'
99
const weakMapTag = '[object WeakMap]'
1010

1111
/** Used to detect maps, sets, and weakmaps. */
12-
const dataViewCtorString = `${ DataView }`
13-
const mapCtorString = `${ Map }`
14-
const promiseCtorString = `${ Promise }`
15-
const setCtorString = `${ Set }`
16-
const weakMapCtorString = `${ WeakMap }`
12+
const dataViewCtorString = `${DataView}`
13+
const mapCtorString = `${Map}`
14+
const promiseCtorString = `${Promise}`
15+
const setCtorString = `${Set}`
16+
const weakMapCtorString = `${WeakMap}`
1717

1818
/**
1919
* Gets the `toStringTag` of `value`.
@@ -33,7 +33,7 @@ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
3333
getTag = (value) => {
3434
const result = baseGetTag(value)
3535
const Ctor = result == objectTag ? value.constructor : undefined
36-
const ctorString = Ctor ? `${ Ctor }` : ''
36+
const ctorString = Ctor ? `${Ctor}` : ''
3737

3838
if (ctorString) {
3939
switch (ctorString) {

.internal/hasUnicode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const rsVarRange = '\\ufe0e\\ufe0f'
1010
const rsZWJ = '\\u200d'
1111

1212
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
13-
const reHasUnicode = RegExp(`[${ rsZWJ + rsAstralRange + rsComboRange + rsVarRange }]`)
13+
const reHasUnicode = RegExp(`[${rsZWJ + rsAstralRange + rsComboRange + rsVarRange}]`)
1414

1515
/**
1616
* Checks if `string` contains Unicode symbols.

.internal/toKey.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function toKey(value) {
1414
if (typeof value == 'string' || isSymbol(value)) {
1515
return value
1616
}
17-
const result = `${ value }`
17+
const result = `${value}`
1818
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result
1919
}
2020

.internal/unicodeSize.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsR
77
const rsVarRange = '\\ufe0e\\ufe0f'
88

99
/** Used to compose unicode capture groups. */
10-
const rsAstral = `[${ rsAstralRange }]`
11-
const rsCombo = `[${ rsComboRange }]`
10+
const rsAstral = `[${rsAstralRange}]`
11+
const rsCombo = `[${rsComboRange}]`
1212
const rsFitz = '\\ud83c[\\udffb-\\udfff]'
13-
const rsModifier = `(?:${ rsCombo }|${ rsFitz })`
14-
const rsNonAstral = `[^${ rsAstralRange }]`
13+
const rsModifier = `(?:${rsCombo}|${rsFitz})`
14+
const rsNonAstral = `[^${rsAstralRange}]`
1515
const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'
1616
const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'
1717
const rsZWJ = '\\u200d'
1818

1919
/** Used to compose unicode regexes. */
20-
const reOptMod = `${ rsModifier }?`
21-
const rsOptVar = `[${ rsVarRange }]?`
22-
const rsOptJoin = `(?:${ rsZWJ }(?:${ [rsNonAstral, rsRegional, rsSurrPair].join('|') })${ rsOptVar + reOptMod })*`
20+
const reOptMod = `${rsModifier}?`
21+
const rsOptVar = `[${rsVarRange}]?`
22+
const rsOptJoin = `(?:${rsZWJ}(?:${[rsNonAstral, rsRegional, rsSurrPair].join('|')})${rsOptVar + reOptMod})*`
2323
const rsSeq = rsOptVar + reOptMod + rsOptJoin
24-
const rsNonAstralCombo = `${ rsNonAstral }${ rsCombo }?`
25-
const rsSymbol = `(?:${ [rsNonAstralCombo, rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') })`
24+
const rsNonAstralCombo = `${rsNonAstral}${rsCombo}?`
25+
const rsSymbol = `(?:${[rsNonAstralCombo, rsCombo, rsRegional, rsSurrPair, rsAstral].join('|')})`
2626

2727
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
28-
const reUnicode = RegExp(`${ rsFitz }(?=${ rsFitz })|${ rsSymbol + rsSeq }`, 'g')
28+
const reUnicode = RegExp(`${rsFitz}(?=${rsFitz})|${rsSymbol + rsSeq}`, 'g')
2929

3030
/**
3131
* Gets the size of a Unicode `string`.

.internal/unicodeToArray.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsR
77
const rsVarRange = '\\ufe0e\\ufe0f'
88

99
/** Used to compose unicode capture groups. */
10-
const rsAstral = `[${ rsAstralRange }]`
11-
const rsCombo = `[${ rsComboRange }]`
10+
const rsAstral = `[${rsAstralRange}]`
11+
const rsCombo = `[${rsComboRange}]`
1212
const rsFitz = '\\ud83c[\\udffb-\\udfff]'
13-
const rsModifier = `(?:${ rsCombo }|${ rsFitz })`
14-
const rsNonAstral = `[^${ rsAstralRange }]`
13+
const rsModifier = `(?:${rsCombo}|${rsFitz})`
14+
const rsNonAstral = `[^${rsAstralRange}]`
1515
const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'
1616
const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'
1717
const rsZWJ = '\\u200d'
1818

1919
/** Used to compose unicode regexes. */
20-
const reOptMod = `${ rsModifier }?`
21-
const rsOptVar = `[${ rsVarRange }]?`
22-
const rsOptJoin = `(?:${ rsZWJ }(?:${ [rsNonAstral, rsRegional, rsSurrPair].join('|') })${ rsOptVar + reOptMod })*`
20+
const reOptMod = `${rsModifier}?`
21+
const rsOptVar = `[${rsVarRange}]?`
22+
const rsOptJoin = `(?:${rsZWJ}(?:${[rsNonAstral, rsRegional, rsSurrPair].join('|')})${rsOptVar + reOptMod})*`
2323
const rsSeq = rsOptVar + reOptMod + rsOptJoin
24-
const rsNonAstralCombo = `${ rsNonAstral }${ rsCombo }?`
25-
const rsSymbol = `(?:${ [rsNonAstralCombo, rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') })`
24+
const rsNonAstralCombo = `${rsNonAstral}${rsCombo}?`
25+
const rsSymbol = `(?:${[rsNonAstralCombo, rsCombo, rsRegional, rsSurrPair, rsAstral].join('|')})`
2626

2727
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
28-
const reUnicode = RegExp(`${ rsFitz }(?=${ rsFitz })|${ rsSymbol + rsSeq }`, 'g')
28+
const reUnicode = RegExp(`${rsFitz}(?=${rsFitz})|${rsSymbol + rsSeq}`, 'g')
2929

3030
/**
3131
* Converts a Unicode `string` to an array.

.internal/unicodeWords.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ const rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpa
1616

1717
/** Used to compose unicode capture groups. */
1818
const rsApos = "['\u2019]"
19-
const rsBreak = `[${ rsBreakRange }]`
20-
const rsCombo = `[${ rsComboRange }]`
19+
const rsBreak = `[${rsBreakRange}]`
20+
const rsCombo = `[${rsComboRange}]`
2121
const rsDigits = '\\d+'
22-
const rsDingbat = `[${ rsDingbatRange }]`
23-
const rsLower = `[${ rsLowerRange }]`
24-
const rsMisc = `[^${ rsAstralRange }${ rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange }]`
22+
const rsDingbat = `[${rsDingbatRange}]`
23+
const rsLower = `[${rsLowerRange}]`
24+
const rsMisc = `[^${rsAstralRange}${rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange}]`
2525
const rsFitz = '\\ud83c[\\udffb-\\udfff]'
26-
const rsModifier = `(?:${ rsCombo }|${ rsFitz })`
27-
const rsNonAstral = `[^${ rsAstralRange }]`
26+
const rsModifier = `(?:${rsCombo}|${rsFitz})`
27+
const rsNonAstral = `[^${rsAstralRange}]`
2828
const rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}'
2929
const rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]'
30-
const rsUpper = `[${ rsUpperRange }]`
30+
const rsUpper = `[${rsUpperRange}]`
3131
const rsZWJ = '\\u200d'
3232

3333
/** Used to compose unicode regexes. */
34-
const rsMiscLower = `(?:${ rsLower }|${ rsMisc })`
35-
const rsMiscUpper = `(?:${ rsUpper }|${ rsMisc })`
36-
const rsOptContrLower = `(?:${ rsApos }(?:d|ll|m|re|s|t|ve))?`
37-
const rsOptContrUpper = `(?:${ rsApos }(?:D|LL|M|RE|S|T|VE))?`
38-
const reOptMod = `${ rsModifier }?`
39-
const rsOptVar = `[${ rsVarRange }]?`
40-
const rsOptJoin = `(?:${ rsZWJ }(?:${ [rsNonAstral, rsRegional, rsSurrPair].join('|') })${ rsOptVar + reOptMod })*`
34+
const rsMiscLower = `(?:${rsLower}|${rsMisc})`
35+
const rsMiscUpper = `(?:${rsUpper}|${rsMisc})`
36+
const rsOptContrLower = `(?:${rsApos}(?:d|ll|m|re|s|t|ve))?`
37+
const rsOptContrUpper = `(?:${rsApos}(?:D|LL|M|RE|S|T|VE))?`
38+
const reOptMod = `${rsModifier}?`
39+
const rsOptVar = `[${rsVarRange}]?`
40+
const rsOptJoin = `(?:${rsZWJ}(?:${[rsNonAstral, rsRegional, rsSurrPair].join('|')})${rsOptVar + reOptMod})*`
4141
const rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)'
4242
const rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)'
4343
const rsSeq = rsOptVar + reOptMod + rsOptJoin
44-
const rsEmoji = `(?:${ [rsDingbat, rsRegional, rsSurrPair].join('|') })${ rsSeq }`
44+
const rsEmoji = `(?:${[rsDingbat, rsRegional, rsSurrPair].join('|')})${rsSeq}`
4545

4646
/**
4747
* Splits a Unicode `string` into an array of its words.
@@ -51,10 +51,10 @@ const rsEmoji = `(?:${ [rsDingbat, rsRegional, rsSurrPair].join('|') })${ rsSeq
5151
* @returns {Array} Returns the words of `string`.
5252
*/
5353
const unicodeWords = RegExp.prototype.exec.bind(RegExp([
54-
`${ rsUpper }?${ rsLower }+${ rsOptContrLower }(?=${ [rsBreak, rsUpper, '$'].join('|') })`,
55-
`${ rsMiscUpper }+${ rsOptContrUpper }(?=${ [rsBreak, rsUpper + rsMiscLower, '$'].join('|') })`,
56-
`${ rsUpper }?${ rsMiscLower }+${ rsOptContrLower }`,
57-
`${ rsUpper }+${ rsOptContrUpper }`,
54+
`${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak, rsUpper, '$'].join('|')})`,
55+
`${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak, rsUpper + rsMiscLower, '$'].join('|')})`,
56+
`${rsUpper}?${rsMiscLower}+${rsOptContrLower}`,
57+
`${rsUpper}+${rsOptContrUpper}`,
5858
rsOrdUpper,
5959
rsOrdLower,
6060
rsDigits,

camelCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import words from './words.js'
2121
* // => 'fooBar'
2222
*/
2323
const camelCase = (string) => (
24-
words(`${ string }`.replace(/['\u2019]/g, '')).reduce((result, word, index) => {
24+
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => {
2525
word = word.toLowerCase()
2626
return result + (index ? capitalize(word) : word)
2727
}, '')

deburr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const rsComboSymbolsRange = '\\u20d0-\\u20ff'
1010
const rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange
1111

1212
/** Used to compose unicode capture groups. */
13-
const rsCombo = `[${ rsComboRange }]`
13+
const rsCombo = `[${rsComboRange}]`
1414

1515
/**
1616
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and

invertBy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty
1717
*
1818
* const object = { 'a': 1, 'b': 2, 'c': 1 }
1919
*
20-
* invertBy(object, value => `group${ value }`)
20+
* invertBy(object, value => `group${value}`)
2121
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
2222
*/
2323
function invertBy(object, iteratee) {

kebabCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import words from './words.js'
2121
* // => 'foo-bar'
2222
*/
2323
const kebabCase = (string) => (
24-
words(`${ string }`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
24+
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
2525
result + (index ? '-' : '') + word.toLowerCase()
2626
), '')
2727
)

lowerCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import words from './words.js'
2020
* // => 'foo bar'
2121
*/
2222
const lowerCase = (string) => (
23-
words(`${ string }`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
23+
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
2424
result + (index ? ' ' : '') + word.toLowerCase()
2525
), '')
2626
)

parseInt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function parseInt(string, radix) {
3333
} else if (radix) {
3434
radix = +radix
3535
}
36-
return nativeParseInt(`${ string }`.replace(reTrimStart, ''), radix || 0)
36+
return nativeParseInt(`${string}`.replace(reTrimStart, ''), radix || 0)
3737
}
3838

3939
export default parseInt

random.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ function random(lower, upper, floating) {
6464
}
6565
if (floating || lower % 1 || upper % 1) {
6666
const rand = Math.random()
67-
const randLength = `${ rand }`.length - 1
68-
return Math.min(lower + (rand * (upper - lower + freeParseFloat(`1e-${ randLength }`)), upper))
67+
const randLength = `${rand}`.length - 1
68+
return Math.min(lower + (rand * (upper - lower + freeParseFloat(`1e-${randLength}`)), upper))
6969
}
7070
return lower + Math.floor(Math.random() * (upper - lower + 1))
7171
}

replace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* // => 'Hi Barney'
1818
*/
1919
function replace(...args) {
20-
const string = `${ args[0] }`
20+
const string = `${args[0]}`
2121
return args.length < 3 ? string : string.replace(args[1], args[2])
2222
}
2323

snakeCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import words from './words.js'
2121
* // => 'foo_bar'
2222
*/
2323
const snakeCase = (string) => (
24-
words(`${ string }`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
24+
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
2525
result + (index ? '_' : '') + word.toLowerCase()
2626
), '')
2727
)

startCase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import words from './words.js'
2222
* // => 'FOO BAR'
2323
*/
2424
const startCase = (string) => (
25-
words(`${ string }`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
25+
words(`${string}`.replace(/['\u2019]/g, '')).reduce((result, word, index) => (
2626
result + (index ? ' ' : '') + upperFirst(word)
2727
), '')
2828
)

startsWith.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function startsWith(string, target, position) {
2929
else if (position > length) {
3030
position = length
3131
}
32-
target = `${ target }`
32+
target = `${target}`
3333
return string.slice(position, position + target.length) == target
3434
}
3535

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy