JSPM

bytearray-node-as3

1.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q33100F
  • License MIT

Node.js implementation of ByteArray's AS3 functions.

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());