Package Exports
- pdu
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pdu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pdu.js
PDU parser and generator for node or your browser.
How to install
npm install pdu.jsHow to use
First require it:
var pdu = require('pdu');pdu.generate()
pdu.generate({
text:'Some text',
receiver:999999999999, //MSISDN
encoding:'16bit' //Or 7bit if you're sending an ascii message.
});returns an array of generated pdu's.
pdu.parse()
pdu.parse('06918919015000240C9189194238148900003110211052254117CAB03D3C1FCBD3703AA81D5E97E7A079D93D2FBB00');Returns an object, containing parsed information:
{ smsc: '9891100500',
smsc_type: '91',
sender: '989124834198',
sender_type: '91',
encoding: '7bit',
time: 1357953952000,
text: 'Javascript makes sense.' }