2.0.2 • Published 8 months ago

node-pdu v2.0.2

Weekly downloads
76
License
MIT
Repository
github
Last release
8 months ago

Protocol Description Unit for NodeJS

Project is looking for maintainer

NPM

Install

npm install node-pdu

Usage

Usage in TypeScript/JavaScript (with ES Modules):

import { Deliver, parse, Submit } from 'node-pdu';

/*
 * Parse a PDU string
 */

const str = '07919730071111F1000B919746121611F10000811170021222230DC8329BFD6681EE6F399B1C02';
const out = parse(str);

if (out instanceof Deliver) {
  console.log(out.data.getText());
  // Output: "Hello, world!"
}

/*
 * Generate a PDU string
 */

const address = '+999999999999';
const data = 'Hello everyone!';

const submit = new Submit(address, data);

console.log(submit.toString());
// Output: "0001000C9199999999999900000FC8329BFD0695ED6579FEED2E8700"

📚 Full documentation

Click here

🧪 Test script

A small script allows you to scan the library for significant errors.

Clone the repository, install yarn, download the dependencies and run:

yarn test

❤️ Contributors

Thanks to these people who have contributed to this project:

Contributors

Made with contrib.rocks.

2.0.2

8 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.0.15

5 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.2

8 years ago

1.0.1

9 years ago

1.0.0

9 years ago