Comparing version 2.0.2 to 2.1.0
@@ -0,10 +1,10 @@ | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
'use strict'; | ||
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
// Generated by CoffeeScript 2.0.0-beta8 | ||
var browserslist = require('browserslist'); | ||
@@ -11,0 +11,0 @@ var _ = require('lodash'); |
@@ -55,9 +55,9 @@ 'use strict'; | ||
key: 'decl', | ||
value: function decl(decl, cb) { | ||
value: function decl(_decl, cb) { | ||
for (var feat in this.features) { | ||
var properties = this.features[feat].properties || []; | ||
var values = this.features[feat].values; | ||
if (properties.filter(isFoundIn(decl.prop)).length > 0) { | ||
if (!values || values.filter(isFoundIn(decl.value)).length > 0) { | ||
cb({ usage: decl, feature: feat }); | ||
if (properties.filter(isFoundIn(_decl.prop)).length > 0) { | ||
if (!values || values.filter(isFoundIn(_decl.value)).length > 0) { | ||
cb({ usage: _decl, feature: feat }); | ||
} | ||
@@ -69,21 +69,21 @@ } | ||
key: 'rule', | ||
value: function rule(rule, cb) { | ||
value: function rule(_rule, cb) { | ||
for (var feat in this.features) { | ||
var selectors = this.features[feat].selectors || []; | ||
if (selectors.filter(isFoundIn(rule.selector)).length > 0) { | ||
cb({ usage: rule, feature: feat }); | ||
if (selectors.filter(isFoundIn(_rule.selector)).length > 0) { | ||
cb({ usage: _rule, feature: feat }); | ||
} | ||
} | ||
this.process(rule, cb); | ||
this.process(_rule, cb); | ||
} | ||
}, { | ||
key: 'atrule', | ||
value: function atrule(atrule, cb) { | ||
value: function atrule(_atrule, cb) { | ||
for (var feat in this.features) { | ||
var atrules = this.features[feat].atrules || []; | ||
var params = this.features[feat].params; | ||
if (atrules.filter(isFoundIn(atrule.name)).length > 0) { | ||
if (!params || params.filter(isFoundIn(atrule.params)).length > 0) { | ||
cb({ usage: atrule, feature: feat }); | ||
if (atrules.filter(isFoundIn(_atrule.name)).length > 0) { | ||
if (!params || params.filter(isFoundIn(_atrule.params)).length > 0) { | ||
cb({ usage: _atrule, feature: feat }); | ||
} | ||
@@ -93,3 +93,3 @@ } | ||
this.process(atrule, cb); | ||
this.process(_atrule, cb); | ||
} | ||
@@ -96,0 +96,0 @@ }, { |
{ | ||
"name": "doiuse", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Lint CSS for browser support against caniuse database.", | ||
@@ -47,2 +47,2 @@ "main": "lib/doiuse.js", | ||
} | ||
} | ||
} |
@@ -40,3 +40,3 @@ var through = require('through2') | ||
generated: { line: line + 1, column: lines[line].length }, | ||
original: {line: oline, column: ocol + lines[line].length }, | ||
original: { line: oline, column: ocol + lines[line].length }, | ||
source: filename | ||
@@ -48,10 +48,18 @@ }) | ||
processor.process(rule.content, {map: {prev: mapper.toString() } }) | ||
processor.process(rule.content, { map: { prev: mapper.toString() } }) | ||
.then(function (result) { | ||
next() | ||
}) | ||
.catch(next) | ||
} catch(e) { | ||
next(e) | ||
.catch(handleError) | ||
} catch (e) { | ||
handleError(e) | ||
} | ||
function handleError (error) { | ||
if (options.skipErrors) { | ||
out.emit('warning', error) | ||
} else { | ||
next(error) | ||
} | ||
} | ||
}) | ||
@@ -58,0 +66,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58803
1642