lib/helpers.js
function unit(value, property) {
	let ignored = ['font-weight', 'opacity', 'content', 'columns', 'column-count'];

	if (ignored.includes(property) || property === false || value === 0 || /\s/.test(value)) {
		return value.toString();
	}

	if (! isUnit(value) && isNumber(value)) {
		if (property === 'line-height') {
			value += units.lineHeight;
		} else {
			value += units.default;
		}
	}

	return value;
}
function unit(value, property) {
	let ignored = ['font-weight', 'opacity', 'content', 'columns', 'column-count'];

	if (ignored.includes(property) || property === false || value === 0 || /\s/.test(value)) {
		return value.toString();
	}

	if (! isUnit(value) && isNumber(value)) {
		if (property === 'line-height') {
			value += units.lineHeight;
		} else {
			value += units.default;
		}
	}

	return value;
}
function unit ( value , property ) { let ignored = [ 'font-weight' , 'opacity' , 'content' , 'columns' , 'column-count' ] ; if ( ignored . includes ( property ) || property === false || value === 0 || / \s / . test ( value ) ) { return value . toString ( ) ; } if ( ! isUnit ( value ) && isNumber ( value ) ) { if ( property === 'line-height' ) { value += units . lineHeight ; } else { value += units . default ; } } return value ; }
Append default unit to value if value is a unit

@param {string|number} value
@param {string|number} property
@return {string}
Append default unit to value if value is a unit