<commit_before>var color = require('stylecow-color');

module.exports = function (stylecow) {

	stylecow.addTask({
		disable: {
			explorer: 9.0
		},
		Declaration: {
			background: fixer,
			"background-image": fixer
		}
	});
};

function fixer (declaration) {
	var fn = declaration.search({type: 'Function', name: 'linear-gradient'});

	if (fn.length === 1) {
		var filter = getFilter(fn[0].getValue());

		if (filter) {
			declaration.ancestor({type: 'Rule'}).addOldMsFilter(filter);
		}
	}
}

function getFilter (params) {
	var direction, reverse;

	switch (params.shift()) {
		case 'to bottom':
		case '90deg':
			direction = 'vertical';
			reverse = false;
			break;

		case 'to top':
		case '-90deg':
			direction = 'vertical';
			reverse = true;
			break;
<commit_msg>changes for the new api in stylecow<commit_after>var color = require('stylecow-color');

module.exports = function (stylecow) {

	stylecow.addTask({
		disable: {
			explorer: 9.0
		},
		Declaration: {
			background: fixer,
			"background-image": fixer
		}
	});
};

function fixer (declaration) {
	var fn = declaration.search({type: 'Function', name: 'linear-gradient'});

	if (fn.length === 1) {
		var filter = getFilter(fn[0].getContent());

		if (filter) {
			declaration.parent({type: 'Rule'}).addOldMsFilter(filter);
		}
	}
}

function getFilter (params) {
	var direction, reverse;

	switch (params.shift()) {
		case 'to bottom':
		case '90deg':
			direction = 'vertical';
			reverse = false;
			break;

		case 'to top':
		case '-90deg':
			direction = 'vertical';
			reverse = true;
			break;

{'fraction_non_alphanumeric': 0.16264294790343076, 'fraction_numerical': 0.010165184243964422, 'mean_word_length': 3.646017699115044, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6549034', 'n_tokens_mistral': 619, 'n_tokens_neox': 543, 'n_words': 130}