Files
30-seconds-of-code/node_modules/remark-parse/lib/locate/break.js
2019-08-20 15:52:05 +02:00

18 lines
247 B
JavaScript

'use strict'
module.exports = locate
function locate(value, fromIndex) {
var index = value.indexOf('\n', fromIndex)
while (index > fromIndex) {
if (value.charAt(index - 1) !== ' ') {
break
}
index--
}
return index
}