You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@seven.io/counter

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seven.io/counter

Counts the SMS character usage in browser as well as NodeJS environments.

1.11.1
latest
Source
npmnpm
Version published
Weekly downloads
2
-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

SMS Counter by seven

Counts the SMS character usage for a textarea or text input.

Installation

For Browsers


<script src='https://unpkg.com/@seven.io/counter/dist/index.js'></script>

For NodeJS

Yarn yarn add @seven.io/counter

NPM npm install @seven.io/counter

import '@seven.io/counter'

Usage

<textarea data-seven-sms></textarea>
<input data-seven-sms/>

For advanced usage see the examples.

Options

Set the window object before loading the library.

window.SEVEN_COUNTER_OPTIONS = {
    initEvent: string = 'DOMContentLoaded', // the DOM event for init
    position: InsertPosition = 'afterend', // where to add the counter stats span relative to the input
    selector: string = '*[data-seven-sms]', // the inputs selector
    standalone: boolean = false, // stop attaching input listeners
    stats: boolean = false, // whether to output stats or not - also accepts HTMLElement or CSS selector
}

Support

Need help? Feel free to contact us.

MIT

Keywords

sms

FAQs

Package last updated on 14 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.