Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

access-sniff

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

access-sniff - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

36

dist/accesssniff.js

@@ -164,25 +164,18 @@ 'use strict';

value: function getElementPosition(htmlString) {
var position = {};
var htmlArray = this.fileContents.split('\n');
var position = {
lineNumber: 0,
columnNumber: 0
};
htmlArray.every(function (element, lineNumber) {
if (!element.match(htmlString)) {
return true;
}
var indexAt = this.fileContents.indexOf(htmlString);
var before = this.fileContents.slice(0, indexAt);
var stringArray = before.split(/\r\n|\r|\n/);
var columnNumber = 0;
var colIndex = 0;
var pattern = /(\s|\t)/g;
if (indexAt === -1) {
return position;
}
while (element.charAt(colIndex).match(pattern)) {
columnNumber++;
colIndex++;
}
position.lineNumber = stringArray.length;
position.columnNumber = stringArray[position.lineNumber - 1].length;
position.lineNumber = lineNumber;
position.columnNumber = columnNumber;
return false;
});
return position;

@@ -300,4 +293,7 @@ }

var files = _bluebird2.default.resolve(filesInput);
_logger2.default.startMessage('Starting Accessibility tests');
if (this.options.verbose) {
_logger2.default.startMessage('Starting Accessibility tests');
}
return files.bind(this).map(this.fileResolver, { concurrency: 1 }).then(function (messageLog) {

@@ -304,0 +300,0 @@ var logs = {};

@@ -37,3 +37,5 @@ 'use strict';

console.log(heading);
console.log(_chalk2.default.cyan(lineMessage));
if (message.position.lineNumber || message.position.columnNumber) {
console.log(_chalk2.default.cyan(lineMessage));
}
console.log(_chalk2.default.grey(message.description));

@@ -40,0 +42,0 @@ console.log(_chalk2.default.grey('--------------------'));

{
"name": "access-sniff",
"version": "2.4.1",
"version": "2.4.2",
"description": "A node/iojs library & CLI for HTML_Codesniffer",

@@ -10,2 +10,3 @@ "main": "dist/",

"scripts": {
"start": "gulp",
"test": "gulp test",

@@ -52,2 +53,3 @@ "prepublish": "npm test"

"babel-preset-es2015": "^6.3.13",
"eslint": "^2.2.0",
"gulp": "^3.9.1",

@@ -54,0 +56,0 @@ "gulp-babel": "^6.1.2",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc