forked from exercism/javascript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcircular-buffer.js
More file actions
40 lines (32 loc) · 922 Bytes
/
Copy pathcircular-buffer.js
File metadata and controls
40 lines (32 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// This is only a SKELETON file for the 'Circular Buffer' exercise. It's been provided as a
// convenience to get you started writing code faster.
//
class CircularBuffer {
constructor() {
throw new Error('Remove this line and implement the function');
}
write() {
throw new Error('Remove this line and implement the function');
}
read() {
throw new Error('Remove this line and implement the function');
}
forceWrite() {
throw new Error('Remove this line and implement the function');
}
clear() {
throw new Error('Remove this line and implement the function');
}
}
export default CircularBuffer;
export class BufferFullError extends Error {
constructor() {
throw new Error('Remove this line and implement the function');
}
}
export class BufferEmptyError extends Error {
constructor() {
throw new Error('Remove this line and implement the function');
}
}