feat: adding linter for commits
This commit is contained in:
13
node_modules/trim-newlines/index.js
generated
vendored
Normal file
13
node_modules/trim-newlines/index.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
module.exports = string => string.replace(/^[\r\n]+/, '').replace(/[\r\n]+$/, '');
|
||||
module.exports.start = string => string.replace(/^[\r\n]+/, '');
|
||||
|
||||
module.exports.end = string => {
|
||||
let end = string.length;
|
||||
|
||||
while (end > 0 && (string[end - 1] === '\r' || string[end - 1] === '\n')) {
|
||||
end--;
|
||||
}
|
||||
|
||||
return end < string.length ? string.slice(0, end) : string;
|
||||
};
|
Reference in New Issue
Block a user