upgrade outdated dependencies

This commit is contained in:
harttle
2017-07-28 21:25:24 +08:00
parent ea2a5f5c3b
commit 4ee2bc964c
28 changed files with 350 additions and 350 deletions
+9 -9
View File
@@ -34,7 +34,7 @@ ParseError.prototype = Object.create(Error.prototype)
ParseError.prototype.constructor = ParseError
function RenderError (e, tpl) {
// return the original render error
// return the original render error
if (e instanceof RenderError) {
return e
}
@@ -79,14 +79,14 @@ function mkContext (input, line) {
var end = Math.min(line + 3, lines.length)
var context = _
.range(begin, end + 1)
.map(l => [
(l === line) ? '>> ' : ' ',
align(l, end),
'| ',
lines[l - 1]
].join(''))
.join('\n')
.range(begin, end + 1)
.map(l => [
(l === line) ? '>> ' : ' ',
align(l, end),
'| ',
lines[l - 1]
].join(''))
.join('\n')
return context
}
+2 -2
View File
@@ -25,8 +25,8 @@ function mapSeries (iterable, iteratee) {
var result = []
iterable.forEach(function (item, idx) {
ret = ret
.then(() => iteratee(item, idx, iterable))
.then(x => result.push(x))
.then(() => iteratee(item, idx, iterable))
.then(x => result.push(x))
})
return ret.then(() => result)
}
+1 -1
View File
@@ -9,7 +9,7 @@ function isString (value) {
function isError (value) {
var signature = Object.prototype.toString.call(value)
// [object XXXError]
// [object XXXError]
return signature.substr(-6, 5) === 'Error' ||
(typeof value.message === 'string' && typeof value.name === 'string')
}