Skip to content

Commit e30a775

Browse files
committed
Update comment
1 parent dbc9d23 commit e30a775

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/tailwindcss/src/utils/infer-data-type.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,20 +329,18 @@ export function isPositiveInteger(value: any) {
329329
return Number.isInteger(num) && num >= 0 && String(num) === String(value)
330330
}
331331

332-
/**
333-
* Returns true if the value is either a positive whole number or a multiple of 0.25.
334-
*/
335332
export function isValidSpacingMultiplier(value: any) {
336333
return isMultipleOf(value, 0.25)
337334
}
338335

339-
/**
340-
* Returns true if the value is either a positive whole number or a multiple of 0.25.
341-
*/
342336
export function isValidOpacityValue(value: any) {
343337
return isMultipleOf(value, 0.25)
344338
}
345339

340+
/**
341+
* Ensures a number (or numeric string) is a multiple of another number, and
342+
* that it has no unnecessary leading or trailing zeros.
343+
*/
346344
function isMultipleOf(value: string | number, divisor: number) {
347345
let num = Number(value)
348346
return num >= 0 && num % divisor === 0 && String(num) === String(value)

0 commit comments

Comments
 (0)