npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zafranudin.zafrin/sms

v0.2.0

Published

A library for Nest that allow you to send simple SMS to preferred recipient, using your provider of choice. Supported by Carsome.

Downloads

52

Readme

Nest | Carsome Sms

A library for Nest that allow you to send simple SMS to preferred recipient, using your provider of choice. Supported by Carsome.

Supported sms provider:

  • Infobip
  • Local
  • Twilio (Upcoming)

Installation

$ npm install --save @zafranudin.zafrin/sms

Usage

To begin using this library, import CSmsModule into your module

import { CSmsModule } from '@zafranudin.zafrin/sms';
import { Module } from '@nestjs/common';


@Module({
    imports: [
        //...
        CSmsModule.register({
                dialect: 'infobip', 
                sender: 'Acme' 
        }),
    ],
})
export class YourModule {}

And then inject the CSmsService into your provider, and you can already use the library.

import { CSmsService } from '@zafranudin.zafrin/sms';
import { Injectable } from '@nestjs/common';

@Injectable()
export class LocalOtpService implements AwesomeService {

    constructor(private smsService: CSmsService) {}
    //...
    
    async doSomethingAwesome(){
        const message = `RM0.00 You should try this library, it's awesome~`;
        await this.smsService.send(message, '60123456789');
    }
}

Useful Helper

Getting the sms body

Perhaps you want to get the body of the sms before sending them. You can do as such:

//...
async doSomethingAwesome(){
    const message = `RM0.00 You should try this library, it's awesome~`;

    const sms = this.smsService.draft(message, '60123456789');
    console.log(sms.getBody());
    await sms.submit();
}

This action wil return to your console the following result

{
    from: 'Acme',  // from your module's sender option
    to: '60123456789',
    text: 'RM0.00 You should try this library, it's awesome~',
}

Sending to multiple recipients

This library also support to send the message to a multiple recipients.

//...
async doSomethingAwesome(){
    const message = `RM0.00 You should try this library, it's awesome~`;
    const recipients = [
        '60123456789',
        '60101228341',
        '60147111476'
    ];
    return await this.smsService.send(message, recipients);
}

Getting the response of the sms provider

At times, you may want to see the response send by the provider.

//...
async doSomethingAwesome(){
    const message = `RM0.00 You should try this library, it's awesome~`;
    const recipients = [
        '60123456789',
        '60101228341',
        '60147111476'
    ];
    const sms = await this.smsService.send(message, recipients);
    console.log(sms.getResponse());
}

Support

If you would like to help and improve this awesome library, kindly make a fork and do your magic!

This project will be using tslint to ensure code quality before commit. We would also appreciate if you would write a test before submitting the pull request.