UNPKG

underscore.string

Version:

String manipulation extensions for Underscore.js javascript library.

9 lines (7 loc) 228 B
var makeString = require('./helper/makeString'); module.exports = function strLeftBack(str, sep) { str = makeString(str); sep = makeString(sep); var pos = str.lastIndexOf(sep); return~ pos ? str.slice(0, pos) : str; };