Bump to v4.11.2.

This commit is contained in:
John-David Dalton
2016-04-19 22:00:04 -07:00
parent e93cb815c3
commit ddde027fd9
89 changed files with 1020 additions and 726 deletions

View File

@@ -1,4 +1,5 @@
var castSlice = require('./_castSlice'),
var baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
isObject = require('./isObject'),
isRegExp = require('./isRegExp'),
reHasComplexSymbol = require('./_reHasComplexSymbol'),
@@ -58,7 +59,7 @@ function truncate(string, options) {
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
omission = 'omission' in options ? toString(options.omission) : omission;
omission = 'omission' in options ? baseToString(options.omission) : omission;
}
string = toString(string);
@@ -98,7 +99,7 @@ function truncate(string, options) {
}
result = result.slice(0, newEnd === undefined ? end : newEnd);
}
} else if (string.indexOf(separator, end) != end) {
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result.lastIndexOf(separator);
if (index > -1) {
result = result.slice(0, index);