WIP - add extractor, generate snippet_data
This commit is contained in:
17
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
17
node_modules/trim-trailing-lines/index.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = trimTrailingLines
|
||||
|
||||
var line = '\n'
|
||||
|
||||
// Remove final newline characters from `value`.
|
||||
function trimTrailingLines(value) {
|
||||
var val = String(value)
|
||||
var index = val.length
|
||||
|
||||
while (val.charAt(--index) === line) {
|
||||
// Empty
|
||||
}
|
||||
|
||||
return val.slice(0, index + 1)
|
||||
}
|
||||
Reference in New Issue
Block a user