Skip to content

Commit

Permalink
Move Endian enum into index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tgpholly committed May 12, 2023
1 parent 9c93894 commit c6d1eb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Endian.ts

This file was deleted.

6 changes: 5 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Endian } from "./Endian";
import { IReader } from "./readers/IReader";
import { IWriter } from "./writers/IWriter";
import { ReaderBE } from "./readers/ReaderBE";
import { ReaderLE } from "./readers/ReaderLE";
import { WriterBE } from "./writers/WriterBE";
import { WriterLE } from "./writers/WriterLE";

export enum Endian {
LE,
BE
}

export function createReader(endianness:Endian, buffer:Buffer) : IReader {
if (endianness === Endian.LE) {
return new ReaderLE(buffer);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bufferstuff",
"version": "1.0.0",
"version": "1.1.0",
"description": "A set of utility classes for reading and writing binary data in NodeJS and the browser",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down

0 comments on commit c6d1eb2

Please sign in to comment.