Giter Club home page Giter Club logo

node-pdu's Introduction

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.

node-pdu's People

Contributors

rsa9000 avatar killerjulian avatar jackkum avatar cchiaramelli avatar souhaib100 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.