sms-length
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Sms-length 💌 📏

A simple utility function to understand how many sms will be required to send a text message via SMS. Largely inspired by sms-counter.

Installation

npm install sms-length

yarn add sms-length

Usage

import { count } from "sms-length";

count("This is a simple text message");

/*

Returns: {
  encoding: "GSM_7BIT",
  length: 29,
  characterPerMessage: 160,
  inCurrentMessage: 29,
  remaining: 131,
  messages: 1,
}

*/

Thanks to

https://github.com/danxexe/sms-counter

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.07,292latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.07,292
0.1.24,093
0.1.1388
0.1.01
0.0.61
0.0.413
0.0.30
0.0.210
0.0.10

Package Sidebar

Install

npm i sms-length

Weekly Downloads

11,798

Version

0.2.0

License

MIT

Unpacked Size

20 kB

Total Files

12

Last publish

Collaborators

  • macs91
  • federicobadini