UNPKG

scancss

Version:

A robust CSS stylesheet statistics collector and analyzer

14 lines (10 loc) 534 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.isKeyframeSelector = isKeyframeSelector; var _rePercentage = require('../../constants/rePercentage'); var _trimSpacesNearCommas = require('../../converters/trimSpacesNearCommas'); function isKeyframeSelector(selector) { return (0, _trimSpacesNearCommas.trimSpacesNearCommas)(selector).split(',').map(selectorPart => selectorPart.trim()).some(selectorPart => /^(from|to)$/.test(selectorPart) || _rePercentage.rePercentage.test(selectorPart)); }