UNPKG

sbd-ts

Version:

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

17 lines (16 loc) 427 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class stringHelper { static endsWithChar(word, c) { if (c.length > 1) { return c.indexOf(word.slice(-1)) > -1; } return word.slice(-1) === c; } ; static endsWith(word, end) { return word.slice(word.length - end.length) === end; } ; } exports.default = stringHelper;