JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13030
  • Score
    100M100P100Q140403F
  • License MIT

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

Package Exports

  • sms-length

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sms-length) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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