diff --git a/package.json b/package.json index 30c6786..7f911f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mtkruto/storage-local-storage", - "version": "1.0.3", + "version": "1.0.4", "description": "", "main": "dist/index.js", "license": "MIT", @@ -8,10 +8,10 @@ "build": "rimraf dist/ && tsc" }, "devDependencies": { - "typescript": "^5.2.2", - "@mtkruto/node": "^0.1.138", + "@mtkruto/node": "^0.1.139", "@types/node-localstorage": "^1.3.2", "node-localstorage": "^3.0.5", - "rimraf": "^5.0.5" + "rimraf": "^5.0.5", + "typescript": "^5.2.2" } } diff --git a/src/index.ts b/src/index.ts index 0d9448d..bfb7e40 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,7 +46,7 @@ export class StorageLocalStorage extends Storage implements Storage { filter: GetManyFilter, params?: { limit?: number; reverse?: boolean }, ) { - let entries = Object.entries(localStorage).sort(([a], [b]) => + let entries = Object.entries(this.#localStorage).sort(([a], [b]) => a.localeCompare(b) ); if (params?.reverse) { diff --git a/tsconfig.json b/tsconfig.json index 7db96b7..5718fad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2016", + "target": "es2019", "module": "commonjs", "rootDir": "./src", "declaration": true,