Package Exports
- bytearray-node-as3
- bytearray-node-as3/dist/index.js
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 (bytearray-node-as3) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ByteArray Node
A Node.js implementation of the Actionscript 3 ByteArray based on this package : https://www.npmjs.com/package/bytearray-node
Installation
npm install bytearray-node-as3
Usage
import { ByteArray } from "bytearray-node-as3";
class Car {
constructor(name, type) {
this.name = name;
this.type = type;
}
}
const myClass = new ByteArray();
myClass.writeByte(100);
myClass.writeObject(new Car("Name", "Type"));
console.log(myClass.readByte());
console.log(myClass.readUTF());
console.log(myClass.readShort());
console.log(myClass.readObject());