Environment
N/a
Reproduction
N/a
Describe the bug
When using a prefixStorage object, the aliases (keys, get, set, etc) just keys still point to the original storage object.
|
// Aliases |
|
keys: (base, opts = {}) => storage.getKeys(base, opts), |
|
get: (key: string, opts = {}) => storage.getItem(key, opts), |
|
set: (key: string, value: T, opts = {}) => |
|
storage.setItem(key, value, opts), |
|
has: (key: string, opts = {}) => storage.hasItem(key, opts), |
|
del: (key: string, opts = {}) => storage.removeItem(key, opts), |
|
remove: (key: string, opts = {}) => storage.removeItem(key, opts), |
prefixStorage copies the object, but doesn't replace these alias functions.
Additional context
No response
Logs
Environment
N/a
Reproduction
N/a
Describe the bug
When using a
prefixStorageobject,the aliases (justkeys,get,set, etc)keysstill point to the original storage object.unstorage/src/storage.ts
Lines 474 to 481 in 1e3082d
prefixStoragecopies the object, but doesn't replace these alias functions.Additional context
No response
Logs