# ussd-pdu-text-converter

> Convert GSM 7bit USSD from PDU to text and vice versa.

Latest version **1.2.2** (published 2016-09-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install ussd-pdu-text-converter
pnpm add ussd-pdu-text-converter
yarn add ussd-pdu-text-converter
bun add ussd-pdu-text-converter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2016-09-22 |
| First published | 2016-09-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Dariush Faqiri |
| Maintainers | motxnew |

## Links

- npm: https://www.npmjs.com/package/ussd-pdu-text-converter
- Repository: https://github.com/motxnew/ussd-pdu-text-converter
- Homepage: https://github.com/motxnew/ussd-pdu-text-converter#readme
- Issues: https://github.com/motxnew/ussd-pdu-text-converter/issues
- npm.io page: https://npm.io/package/ussd-pdu-text-converter

## Dependencies (2)

- [typings](https://npm.io/package/typings.md) ^1.3.3
- [querystring](https://npm.io/package/querystring.md) ^0.2.0

## Recent versions

- 1.2.2 (latest) — 2016-09-22
- 1.2.1 — 2016-09-22
- 1.2.0 — 2016-09-22
- 1.1.0 — 2016-09-22
- 1.0.0 — 2016-09-22

## README

# ussd-pdu-text-converter
Convert GSM 7bit USSD from PDU to text and vice versa.

##Installation
    npm install ussd-pdu-text-converter
    
##Usage
ES6 syntax:
    
    import {UssdEncoderDecoder} from 'ussd-pdu-text-converter';

RequireJS syntax:

    var UssdEncoderDecoder = require('ussd-pdu-text-converter');

##API

####`decodeAs7bitGSM(pdu:string) : string`
To decode a 7-bit GSM USSD PDU to text:
        
    UssdEncoderDecoder.decodeAs7bitGSM('C8329BFD065DDF72363904');

Output:
    
    Hello World

####`encodeAs7bitGSM(text:string) : string`

To encode a text to 7-bit GSM USSD PDU:

    UssdEncoderDecoder.encodeAs7bitGSM('Hello World!')

Output:

    C8329BFD065DDF72363904
    
##Credits

[Froelich Stefan](https://github.com/frostymarvelous/USSD-PDU-Converters)

---
_Source: https://npm.io/package/ussd-pdu-text-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
