everstorage
Advanced tools
Comparing version 0.8.2 to 0.9.0
@@ -10,2 +10,3 @@ import { Observable } from 'rxjs'; | ||
readonly defaultValue: TValue; | ||
private baseStorage?; | ||
protected serializer: Serializer<TValue>; | ||
@@ -19,10 +20,12 @@ values: Observable<TValue>; | ||
private storage?; | ||
constructor(defaultValue: TValue, options?: Partial<IBrowserHistoryStorageOptions>, storage?: IStorage<ISerialized>, serializer?: Serializer<TValue>); | ||
private initialized; | ||
constructor(defaultValue: TValue, options?: Partial<IBrowserHistoryStorageOptions>, baseStorage?: IStorage<ISerialized> | undefined, serializer?: Serializer<TValue>); | ||
get value(): TValue; | ||
pushValue(partialValue: Partial<TValue>): Promise<void>; | ||
dispose(): void; | ||
protected abstract decodeUrl(url: string): Partial<TValue>; | ||
protected abstract encodeUrl(params: TValue, lastUrl: string): string; | ||
createLink(value: TValue, baseUrl?: URL | string): URL; | ||
initialize(): Promise<void>; | ||
protected abstract decodeUrl(url: URL): Partial<TValue>; | ||
protected abstract encodeUrl(params: TValue, lastUrl: URL): URL; | ||
protected createUniqueIdentifier(): string; | ||
private init; | ||
} |
@@ -12,4 +12,4 @@ import { IObservableStorage } from '../../interfaces/IObservableStorage'; | ||
constructor(decodeUrlPathHash: (url: string) => TValue, encodeUrlPathHash: (params: TValue) => string, defaultValue: TValue, options?: Partial<IBrowserHistoryStorageOptions>, storage?: IStorage<ISerialized>, serializer?: Serializer<TValue>); | ||
protected decodeUrl(url: string): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: string): string; | ||
protected decodeUrl(url: URL): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: URL): URL; | ||
} |
@@ -12,4 +12,4 @@ import { IObservableStorage } from '../../interfaces/IObservableStorage'; | ||
constructor(decodeUrlPath: (url: string) => TValue, encodeUrlPath: (params: TValue) => string, defaultValue: TValue, options?: Partial<IBrowserHistoryStorageOptions>, storage?: IStorage<ISerialized>, serializer?: Serializer<TValue>); | ||
protected decodeUrl(url: string): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: string): string; | ||
protected decodeUrl(url: URL): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: URL): URL; | ||
} |
@@ -10,4 +10,4 @@ import { IObservableStorage } from '../../interfaces/IObservableStorage'; | ||
export declare class BrowserHistoryQueryStorage<TValue extends ISerializable> extends AbstractBrowserHistoryStorage<TValue> implements IObservableStorage<TValue> { | ||
protected decodeUrl(url: string): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: string): string; | ||
protected decodeUrl(url: URL): Partial<TValue>; | ||
protected encodeUrl(params: TValue, lastUrl: URL): URL; | ||
} |
export interface IBrowserHistoryStorageOptions { | ||
initialize: boolean; | ||
uniqueIdentifier: null | string; | ||
debounceInterval: number; | ||
@@ -3,0 +5,0 @@ preventDuplicates: boolean; |
@@ -1,4 +0,4 @@ | ||
import { IInstantiable } from './IInstantiable'; | ||
export interface ISerializable extends Partial<IInstantiable> { | ||
[key: string]: string | number | null | undefined | IInstantiable | ISerializable[] | ISerializable; | ||
export declare type ISerializable = ISerializableCore | object; | ||
export interface ISerializableCore { | ||
[key: string]: string | number | null | undefined | object | ISerializable[] | ISerializable; | ||
} |
@@ -21,2 +21,3 @@ import { AsyncStorage } from './classes/AsyncStorage'; | ||
import { ISerializable } from './interfaces/ISerializable'; | ||
import { ISerializableCore } from './interfaces/ISerializable'; | ||
import { ISerialized } from './interfaces/ISerialized'; | ||
@@ -30,2 +31,2 @@ import { ISerializeRule } from './interfaces/ISerializeRule'; | ||
import { serializerWithDate } from './utils/serializers'; | ||
export { IJson, IStorage, isNumeric, serializer, Serializer, IAwaitable, ISerialized, MultiStorage, AsyncStorage, ISerializable, IInstantiable, IBrowserState, PrefixStorage, ObjectStorage, MemoryStorage, ISerializeRule, blackholeStorage, BlackholeStorage, SerializedStorage, serializerWithDate, IObservableStorage, objectLocalStorage, BrowserHistoryPathStorage, BrowserHistoryQueryStorage, IBrowserHistoryStorageOptions, BrowserHistoryPathHashStorage, createUniqueIdentifierFromParams, BROWSER_HISTORY_STORAGE_OPTIONS_DEFAULTS, }; | ||
export { IJson, IStorage, isNumeric, serializer, Serializer, IAwaitable, ISerialized, MultiStorage, AsyncStorage, ISerializable, IInstantiable, IBrowserState, PrefixStorage, ObjectStorage, MemoryStorage, ISerializeRule, blackholeStorage, BlackholeStorage, ISerializableCore, SerializedStorage, serializerWithDate, IObservableStorage, objectLocalStorage, BrowserHistoryPathStorage, BrowserHistoryQueryStorage, IBrowserHistoryStorageOptions, BrowserHistoryPathHashStorage, createUniqueIdentifierFromParams, BROWSER_HISTORY_STORAGE_OPTIONS_DEFAULTS, }; |
{ | ||
"name": "everstorage", | ||
"version": "0.8.2", | ||
"version": "0.9.0", | ||
"author": "Pavol Hejný <me@pavolhejny.com> (https://pavolhejny.com)", | ||
@@ -19,3 +19,3 @@ "description": "A vector manipulation class", | ||
"start": "npm run develop", | ||
"preversion": "npm run generate-main-exports-commit && npm test && npm run lint && npm run build && npm run prettier-commit && npm run documentation-commit", | ||
"preversion": "npm test && npm run lint && npm run build && npm run prettier-commit && npm run generate-main-exports-commit && npm run documentation-commit", | ||
"postversion": "git push && git push --tags && npm publish && npm run update-in-other-repos", | ||
@@ -34,3 +34,3 @@ "build": "webpack --config webpack.production.config.js", | ||
"generate-main-exports": "ts-node ./scripts/generate-main-exports/generate-main-exports.ts", | ||
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && git add src && git commit --allow-empty -m \"Updating exports\"", | ||
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && npm run prettier && git add src && git commit --allow-empty -m \"Updating exports\"", | ||
"update-in-other-repos": "npm run update-in-other-krmitka && npm run update-in-other-collboard", | ||
@@ -37,0 +37,0 @@ "update-in-other-collboard": "cd ../../HeduApp/collboard && git stash && npm i everstorage@latest && git add package.json package-lock.json && git commit --allow-empty -m \"Update of everstorage\" && git push && git stash pop", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2812295
15048