hacktoberfestdockeruptime-monitoringuptimesocket-iosingle-page-appselfhostedself-hostedresponsivemonitoringwebsocketwebapp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
226 B
13 lines
226 B
class LimitArray {
|
|
limit = 100;
|
|
array = [];
|
|
|
|
add(item) {
|
|
this.array.push(item);
|
|
if (this.array.length > this.limit) {
|
|
this.array.shift();
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = LimitArray;
|
|
|