Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[merge] from master
  • Loading branch information
jtenner committed Aug 6, 2019
commit cc536a0fbba888414fca3bb589edac4267d8e907
1 change: 1 addition & 0 deletions assembly/buffer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class Buffer extends Uint8Array {
}
ERROR("Cannot call Buffer.from<T>() where T is not a string, Buffer, ArrayBuffer, Array, or Array-like Object.");
}

public static isBuffer<T>(value: T): bool {
return value instanceof Buffer;
}
Expand Down
7 changes: 0 additions & 7 deletions tests/buffer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
function bufferFrom<T>(values: valueof<T>[]): T {
let buffer = instantiate<T>(values.length);
// @ts-ignore
for (let i = 0; i < values.length; i++) buffer[i] = values[i];
return buffer;
}

/**
* This is the buffer test suite. For each prototype function, put a single test
* function call here.
Expand Down