From 8de5f0e47b2450cbbd18751fd9b5a6cc46bb5689 Mon Sep 17 00:00:00 2001 From: hazae41 Date: Sat, 3 Sep 2022 13:38:56 +0200 Subject: [PATCH] remove has, bump --- dist/index.esm.js | 13 ------------- dist/index.js | 13 ------------- dist/mods/core.d.ts | 1 - package.json | 2 +- src/mods/core.ts | 15 --------------- 5 files changed, 1 insertion(+), 43 deletions(-) diff --git a/dist/index.esm.js b/dist/index.esm.js index ab906030..1cb3742f 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -901,19 +901,6 @@ var Core = /** @class */ (function (_super) { } this._mounted = false; }; - Core.prototype.hasSync = function (skey, params) { - if (params === void 0) { params = {}; } - if (skey === undefined) - return false; - if (this.cache.has(skey)) - return true; - var storage = params.storage; - if (!storage) - return false; - if (isAsyncStorage(storage)) - return false; - return Boolean(storage.get(skey)); - }; Core.prototype.getSync = function (skey, params) { if (params === void 0) { params = {}; } if (skey === undefined) diff --git a/dist/index.js b/dist/index.js index f194d7ba..2a880baf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -907,19 +907,6 @@ var Core = /** @class */ (function (_super) { } this._mounted = false; }; - Core.prototype.hasSync = function (skey, params) { - if (params === void 0) { params = {}; } - if (skey === undefined) - return false; - if (this.cache.has(skey)) - return true; - var storage = params.storage; - if (!storage) - return false; - if (isAsyncStorage(storage)) - return false; - return Boolean(storage.get(skey)); - }; Core.prototype.getSync = function (skey, params) { if (params === void 0) { params = {}; } if (skey === undefined) diff --git a/dist/mods/core.d.ts b/dist/mods/core.d.ts index 704c7898..0a9296fb 100644 --- a/dist/mods/core.d.ts +++ b/dist/mods/core.d.ts @@ -13,7 +13,6 @@ export declare class Core extends Ortho { constructor(); get mounted(): boolean; unmount(): void; - hasSync(skey: string | undefined, params?: Params): boolean; getSync(skey: string | undefined, params?: Params): State | undefined | null; get(skey: string | undefined, params?: Params): Promise | undefined>; /** diff --git a/package.json b/package.json index 34c55443..f0f42956 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hazae41/xswr", - "version": "1.0.53", + "version": "1.0.54", "author": "hazae41", "license": "MIT", "description": "The simplest React data (re)fetching library ever made", diff --git a/src/mods/core.ts b/src/mods/core.ts index 9133cd58..200ea89c 100644 --- a/src/mods/core.ts +++ b/src/mods/core.ts @@ -27,21 +27,6 @@ export class Core extends Ortho { this._mounted = false } - hasSync( - skey: string | undefined, - params: Params = {} - ): boolean { - if (skey === undefined) return false - - if (this.cache.has(skey)) - return true - - const { storage } = params - if (!storage) return false - if (isAsyncStorage(storage)) return false - return Boolean(storage.get(skey)) - } - getSync( skey: string | undefined, params: Params = {}