UNPKG

rn-sbd

Version:

Split text into sentences with Sentence Boundary Detection (SBD).

12 lines (9 loc) 284 B
exports.endsWithChar = function ends_with_char(word, c) { if (c.length > 1) { return c.indexOf(word.slice(-1)) > -1; } return word.slice(-1) === c; }; exports.endsWith = function ends_with(word, end) { return word.slice(word.length - end.length) === end; };