const Declaration = require('../declaration');

class Animation extends Declaration {

    static names = ['animation', 'animation-direction'];

    /**
     * Don’t add prefixes for modern values.
     */
    check(decl) {
        return !decl.value.split(/\s+/).find(i => {
            const lower = i.toLowerCase();
            return lower === 'reverse' || lower === 'alternate-reverse';
        });
    }

}

module.exports = Animation;

const Declaration = require('../declaration');

class Animation extends Declaration {

    static names = ['animation', 'animation-direction'];

    /**
     * Don’t add prefixes for modern values.
     */
    check(decl) {
        let found = false;
        decl.value.split(/\s+/).forEach(i => {
            const lower = i.toLowerCase();
            if (lower === 'reverse' || lower === 'alternate-reverse') {
                found = true;
                return false;
            } else {
                return true;
            }
        });
        return !found;
    }

}

module.exports = Animation;

Fix old JS runtimes support
Fix old JS runtimes support
