Skip to content

Commit

Permalink
remove has, bump
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed Sep 3, 2022
1 parent b765fd1 commit 8de5f0e
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 43 deletions.
13 changes: 0 additions & 13 deletions dist/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 0 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion dist/mods/core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export declare class Core extends Ortho<string, State | undefined> {
constructor();
get mounted(): boolean;
unmount(): void;
hasSync<D = any, E = any>(skey: string | undefined, params?: Params<D, E>): boolean;
getSync<D = any, E = any>(skey: string | undefined, params?: Params<D, E>): State<D, E> | undefined | null;
get<D = any, E = any>(skey: string | undefined, params?: Params<D, E>): Promise<State<D, E> | undefined>;
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
15 changes: 0 additions & 15 deletions src/mods/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ export class Core extends Ortho<string, State | undefined> {
this._mounted = false
}

hasSync<D = any, E = any>(
skey: string | undefined,
params: Params<D, E> = {}
): 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<D = any, E = any>(
skey: string | undefined,
params: Params<D, E> = {}
Expand Down

0 comments on commit 8de5f0e

Please sign in to comment.