mirror of
https://github.com/thangisme/notes.git
synced 2025-09-25 13:44:05 -04:00
Initial commit
This commit is contained in:
20
node_modules/postcss-reporter/lib/util.js
generated
vendored
Normal file
20
node_modules/postcss-reporter/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
var _ = require('lodash');
|
||||
|
||||
exports.getLocation = function(message) {
|
||||
var messageNode = message.node;
|
||||
|
||||
var location = {
|
||||
line: message.line,
|
||||
column: message.column,
|
||||
};
|
||||
|
||||
var messageInput = _.get(messageNode, 'source.input');
|
||||
|
||||
if (!messageInput) return location;
|
||||
|
||||
var originLocation = messageInput.origin && messageInput.origin(message.line, message.column)
|
||||
if (originLocation) return originLocation
|
||||
|
||||
location.file = messageInput.file || messageInput.id;
|
||||
return location;
|
||||
};
|
Reference in New Issue
Block a user