@praphan.o/thai-sentence-cut
TypeScript icon, indicating that this package has built-in type declarations

1.1.8 • Public • Published

การตัดข้อความภาษาไทยโดยไม่นับสระลอยและวรรณยุกต์

version version code coverage

Installation

This is a Node.js module available through the npm registry.

$ npm install --save @praphan.o/thai-sentence-cut

Usage

const { lengthOfThaiString, splitThaiStringByLength } = require('../src');

const str = "ประโยคยาวๆ ที่ใช้ทดสอบการตัดคำและการนับความยาวของตัวอักขระโดยไม่สนใจสระและวรรณยุกต์ไทย";

console.log(lengthOfThaiString(s));

// output:
// 76

console.log(splitThaiStringByLength(s,20));

// output:
// [ 'ประโยคยาวๆ ที่ใช้ทดสอบ',
//   'การตัดคำและการนับความ',
//   'ยาวของตัวอักขระโดยไม่',
//   'สนใจสระและวรรณยุกต์ไทย' ]

Depends

Update

  • 1.1.0 splitThaiStringByLength can split multi-line string (string with new line character)
  • 1.1.1 update correct version
  • 1.1.2 update dependencies to avoid vulnerabilities
  • 1.1.3 just update readme (sorry for this)
  • 1.1.4 update repository url
  • 1.1.5 update dependencies
  • 1.1.6 typescript support

Package Sidebar

Install

npm i @praphan.o/thai-sentence-cut

Weekly Downloads

2

Version

1.1.8

License

ISC

Unpacked Size

28 kB

Total Files

13

Last publish

Collaborators

  • e23thr