stylelint
Version:
A mighty CSS linter that helps you avoid errors and enforce conventions.
18 lines (15 loc) • 338 B
JavaScript
import isWhitespace from './isWhitespace.mjs';
/**
* Returns a Boolean indicating whether the input string is only whitespace.
*
* @param {string} input
* @returns {boolean}
*/
export default function isOnlyWhitespace(input) {
for (const element of input) {
if (!isWhitespace(element)) {
return false;
}
}
return true;
}