Move Endian enum into index.ts
This commit is contained in:
parent
9c93894160
commit
c6d1eb2e54
3 changed files with 6 additions and 6 deletions
|
@ -1,4 +0,0 @@
|
|||
export enum Endian {
|
||||
LE,
|
||||
BE
|
||||
}
|
6
index.ts
6
index.ts
|
@ -1,4 +1,3 @@
|
|||
import { Endian } from "./Endian";
|
||||
import { IReader } from "./readers/IReader";
|
||||
import { IWriter } from "./writers/IWriter";
|
||||
import { ReaderBE } from "./readers/ReaderBE";
|
||||
|
@ -6,6 +5,11 @@ 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);
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue