Middleware
ss.use('*', new UpperMiddleware());class UpperMiddleware implements MiddlewareStack {
count = 1;
set(storageInfo: StorageInfo, next: () => void) {
storageInfo.content = storageInfo.content.toUpperCase();
next();
}
get(storageInfo: StorageInfo, next: () => void) {
storageInfo.content = `${this.count} ${storageInfo.origin}`;
this.count++;
next();
}
}Last updated