![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ais-stream-decoder
Advanced tools
AIS/NMEA decoder with native Node.js stream interface (TypeScript/JavaScript)
AIS/NMEA decoder with native stream interface for Node.js.
This is a Node.js module available through the npm registry.
Installation is done using the npm install
command:
$ npm install ais-stream-decoder
import AisDecoder from 'ais-stream-decoder';
const aisDecoder = new AisDecoder();
aisDecoder.on('error', err => console.error(err));
aisDecoder.on('data', decodedMessage => console.log(decodedMessage));
const nmea = '!AIVDM,1,1,,B,133i;RPP1DPEbcDMV@1r:Ow:2>`<,0*41';
aisDecoder.write(nmea);
=>
{"type":1,"channel":"B","repeat":0,"mmsi":205278090,"navStatus":0,"rateOfTurn":null,"speedOverGround":8.4,"accuracy":true,"lon":4.73319,"lat":51.725665,"courseOverGround":260.1,"heading":null,"utcSecond":37,"specialManoeuvre":0,"raim":true,"radio":59916,"sentences":["!AIVDM,1,1,,B,133i;RPP1DPEbcDMV@1r:Ow:2>`<,0*41"]}
import AisDecoder from 'ais-stream-decoder';
const aisDecoder = new AisDecoder();
aisDecoder.on('error', err => console.error(err));
aisDecoder.on('data', decodedMessage => console.log(decodedMessage));
const part1 =
'!AIVDM,2,1,7,A,57lof8`2F5HeT<eC:204e86373:222222222221@8HQC16Ch0:RA7kAD,0*28';
const part2 = '!AIVDM,2,2,7,A,PBp888888888880,2*79';
aisDecoder.write(part1);
aisDecoder.write(part2);
=>
{"type":5,"channel":"A","repeat":0,"mmsi":525200930,"aisVersion":2,"imo":9835915,"callsign":"YCKT2","name":"AKRA 102","typeAndCargo":80,"dimBow":67,"dimStern":33,"dimPort":19,"dimStarboard":1,"epfd":1,"etaMonth":9,"etaDay":7,"etaHour":16,"etaMinute":0,"draught":4.2,"destination":"ID_MERAK","dte":false,"sentences":["!AIVDM,2,1,7,A,57lof8`2F5HeT<eC:204e86373:222222222221@8HQC16Ch0:RA7kAD,0*28","!AIVDM,2,2,7,A,PBp888888888880,2*79"]}
import AisDecoder from 'ais-stream-decoder';
import {createReadStream} from 'fs';
import {resolve} from 'path';
import {createInterface} from 'readline';
const aisDecoder = new AisDecoder();
aisDecoder.on('error', err => console.error(err));
aisDecoder.on('data', decodedMessage => console.log(decodedMessage));
const fileStream = createReadStream(
resolve(__dirname, './examples/messages.txt')
);
const readLine = createInterface(fileStream);
readLine.on('line', line => aisDecoder.write(line));
import AisDecoder from 'ais-stream-decoder';
import split from 'split';
import {createReadStream} from 'fs';
import {resolve} from 'path';
const fileStream = createReadStream(
resolve(__dirname, './examples/messages.txt')
);
const aisDecoder = new AisDecoder({silent: true});
fileStream
.pipe(split())
.pipe(aisDecoder)
.on('data', decodedMessage => {
console.log(decodedMessage);
});
FAQs
AIS/NMEA decoder with native Node.js stream interface (TypeScript/JavaScript)
We found that ais-stream-decoder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.