@ngx-pwa/local-storage
Advanced tools
Comparing version 11.0.0-0 to 11.0.0-1
@@ -294,2 +294,2 @@ import { Injectable, Inject } from '@angular/core'; | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1tYXAuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvY3lyaWxsZS9XZWIvb3BlbnNvdXJjZS9hbmd1bGFyLWFzeW5jLWxvY2FsLXN0b3JhZ2UvcHJvamVjdHMvbmd4LXB3YS9sb2NhbC1zdG9yYWdlL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9zdG9yYWdlcy9zdG9yYWdlLW1hcC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBYyxVQUFVLEVBQUUsRUFBRSxFQUFvQixhQUFhLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDbkYsT0FBTyxFQUFFLFFBQVEsRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFNM0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQzdELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ3BFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG9DQUFvQyxDQUFDO0FBQzFFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDNUQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDM0QsT0FBTyxFQUFFLFNBQVMsRUFBRSxN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HR0cHM6Ly9naXRodWIuY29tL2N5cmlsbGV0dXppL2FuZ3VsYXItYXN5bmMtbG9jYWwtc3RvcmFnZS9pc3N1ZXMvMTE4XG4gICAgICAgICAqL1xuICAgICAgICB0cnkge1xuXG4gICAgICAgICAgaWYgKCdnZXRJdGVtJyBpbiBsb2NhbFN0b3JhZ2UpIHtcblxuICAgICAgICAgICAgLyogRmFsbGJhY2sgdG8gYGxvY2FsU3RvcmFnZWAgaWYgYXZhaWxhYmxlICovXG4gICAgICAgICAgICB0aGlzLmRhdGFiYXNlID0gbmV3IExvY2FsU3RvcmFnZURhdGFiYXNlKHRoaXMuTFNQcmVmaXgpO1xuXG4gICAgICAgICAgfSBlbHNlIHtcblxuICAgICAgICAgICAgLyogRmFsbGJhY2sgdG8gbWVtb3J5IHN0b3JhZ2Ugb3RoZXJ3aXNlICovXG4gICAgICAgICAgICB0aGlzLmRhdGFiYXNlID0gbmV3IE1lbW9yeURhdGFiYXNlKCk7XG5cbiAgICAgICAgICB9XG5cbiAgICAgICAgfSBjYXRjaCB7XG5cbiAgICAgICAgICAvKiBGYWxsYmFjayB0byBtZW1vcnkgc3RvcmFnZSBvdGhlcndpc2UgKi9cbiAgICAgICAgICB0aGlzLmRhdGFiYXNlID0gbmV3IE1lbW9yeURhdGFiYXNlKCk7XG5cbiAgICAgICAgfVxuXG4gICAgICAgIC8qIFJlZG8gdGhlIG9wZXJhdGlvbiAqL1xuICAgICAgICByZXR1cm4gb3BlcmF0aW9uQ2FsbGJhY2soKTtcblxuICAgICAgfSBlbHNlIHtcblxuICAgICAgICAvKiBPdGhlcndpc2UsIHJldGhyb3cgdGhlIGVycm9yICovXG4gICAgICAgIHJldHVybiB0aHJvd0Vycm9yKGVycm9yKTtcblxuICAgICAgfVxuXG4gICAgfSk7XG5cbiAgfVxuXG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZS1tYXAuc2VydmljZS5qcyIsIn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ICAgICAgICAvKiBGYWxsYmFjayB0byBgbG9jYWxTdG9yYWdlYCBpZiBhdmFpbGFibGUgKi9cbiAgICAgICAgICAgIHRoaXMuZGF0YWJhc2UgPSBuZXcgTG9jYWxTdG9yYWdlRGF0YWJhc2UodGhpcy5MU1ByZWZpeCk7XG5cbiAgICAgICAgICB9IGVsc2Uge1xuXG4gICAgICAgICAgICAvKiBGYWxsYmFjayB0byBtZW1vcnkgc3RvcmFnZSBvdGhlcndpc2UgKi9cbiAgICAgICAgICAgIHRoaXMuZGF0YWJhc2UgPSBuZXcgTWVtb3J5RGF0YWJhc2UoKTtcblxuICAgICAgICAgIH1cblxuICAgICAgICB9IGNhdGNoIHtcblxuICAgICAgICAgIC8qIEZhbGxiYWNrIHRvIG1lbW9yeSBzdG9yYWdlIG90aGVyd2lzZSAqL1xuICAgICAgICAgIHRoaXMuZGF0YWJhc2UgPSBuZXcgTWVtb3J5RGF0YWJhc2UoKTtcblxuICAgICAgICB9XG5cbiAgICAgICAgLyogUmVkbyB0aGUgb3BlcmF0aW9uICovXG4gICAgICAgIHJldHVybiBvcGVyYXRpb25DYWxsYmFjaygpO1xuXG4gICAgICB9IGVsc2Uge1xuXG4gICAgICAgIC8qIE90aGVyd2lzZSwgcmV0aHJvdyB0aGUgZXJyb3IgKi9cbiAgICAgICAgcmV0dXJuIHRocm93RXJyb3IoZXJyb3IpO1xuXG4gICAgICB9XG5cbiAgICB9KTtcblxuICB9XG5cbn1cbiJdfQ== |
@@ -5,2 +5,2 @@ /* All schemas interfaces must have a required and different `type`, | ||
export {}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi1zY2hlbWEuanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2N5cmlsbGUvV2ViL29wZW5zb3VyY2UvYW5ndWxhci1hc3luYy1sb2NhbC1zdG9yYWdlL3Byb2plY3RzL25neC1wd2EvbG9jYWwtc3RvcmFnZS9zcmMvIiwic291cmNlcyI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ogQGV4YW1wbGVcbiAqIGNvbnN0IHNjaGVtYTogSlNPTlNjaGVtYSA9IHtcbiAqICAgdHlwZTogJ29iamVjdCcsXG4gKiAgIHByb3BlcnRpZXM6IHtcbiAqICAgICBmaXJzdE5hbWU6IHsgdHlwZTogJ3N0cmluZycgfSxcbiAqICAgICBsYXN0TmFtZTogeyB0eXBlOiAnc3RyaW5nJyB9LFxuICogICB9LFxuICogICByZXF1aXJlZDogWydmaXJzdE5hbWUnXSxcbiAqIH07XG4gKi9cbmV4cG9ydCB0eXBlIEpTT05TY2hlbWEgPSBKU09OU2NoZW1hU3RyaW5nIHwgSlNPTlNjaGVtYU51bWJlciB8IEpTT05TY2hlbWFJbnRlZ2VyIHwgSlNPTlNjaGVtYUJvb2xlYW4gfCBKU09OU2NoZW1hQXJyYXkgfCBKU09OU2NoZW1hT2JqZWN0O1xuIl19 |
@@ -142,2 +142,4 @@ import { Injectable } from '@angular/core'; | ||
for (const value of data) { | ||
// TODO: remove when TypeScript 4.1 is available | ||
// (currently the narrowed type from `Array.isArray()` is lost on readonly arrays) | ||
if (!this.validate(value, schema.items)) { | ||
@@ -235,2 +237,2 @@ return false; | ||
]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2N5cmlsbGUvV2ViL29wZW5zb3VyY2UvYW5ndWxhci1hc3luYy1sb2NhbC1zdG9yYWdlL3Byb2plY3RzL25neC1wd2EvbG9jYWwtc3RvcmFnZS9zcmMvIiwic291cmNlcyI6WyJsaWIvdmFsaWRhdGlvbi9qc29uLXZhbGlkYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVUzQyxNQUFNLE9BQU8sYUFBYTtJQUV4Qjs7Ozs7OztPQU9HO0lBQ0gsUUFBUSxDQ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GlzIGxvc3QgKi9cbiAgICByZXR1cm4gKChzY2hlbWEuZW51bSBhcyB1bmtub3duW10pLmluY2x1ZGVzKGRhdGEpKTtcblxuICB9XG5cbn1cbiJdfQ== |
@@ -145,2 +145,4 @@ import { ɵɵdefineInjectable, Injectable, InjectionToken, ɵɵinject, Inject, PLATFORM_ID, NgModule } from '@angular/core'; | ||
for (const value of data) { | ||
// TODO: remove when TypeScript 4.1 is available | ||
// (currently the narrowed type from `Array.isArray()` is lost on readonly arrays) | ||
if (!this.validate(value, schema.items)) { | ||
@@ -147,0 +149,0 @@ return false; |
@@ -109,3 +109,3 @@ import { Observable, OperatorFunction, ReplaySubject } from 'rxjs'; | ||
*/ | ||
get<T extends string = string>(key: string, schema: JSONSchemaString): Observable<string | undefined>; | ||
get<T extends string = string>(key: string, schema: JSONSchemaString): Observable<T | undefined>; | ||
/** | ||
@@ -116,3 +116,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
get<T = string>(key: string, schema: JSONSchemaString): Observable<string | undefined>; | ||
get<T extends number = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<number | undefined>; | ||
get<T extends number = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<T | undefined>; | ||
/** | ||
@@ -123,3 +123,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
get<T = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<number | undefined>; | ||
get<T extends boolean = boolean>(key: string, schema: JSONSchemaBoolean): Observable<boolean | undefined>; | ||
get<T extends boolean = boolean>(key: string, schema: JSONSchemaBoolean): Observable<T | undefined>; | ||
/** | ||
@@ -130,3 +130,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
get<T = boolean>(key: string, schema: JSONSchemaBoolean): Observable<boolean | undefined>; | ||
get<T extends string[] = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<string[] | undefined>; | ||
get<T extends readonly string[] = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<T | undefined>; | ||
/** | ||
@@ -137,3 +137,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
get<T = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<string[] | undefined>; | ||
get<T extends number[] = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<number[] | undefined>; | ||
get<T extends readonly number[] = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<T | undefined>; | ||
/** | ||
@@ -144,3 +144,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
get<T = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<number[] | undefined>; | ||
get<T extends boolean[] = boolean[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaBoolean>): Observable<boolean[] | undefined>; | ||
get<T extends readonly boolean[] = boolean[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaBoolean>): Observable<T | undefined>; | ||
/** | ||
@@ -220,3 +220,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
*/ | ||
watch<T extends string = string>(key: string, schema: JSONSchemaString): Observable<string | undefined>; | ||
watch<T extends string = string>(key: string, schema: JSONSchemaString): Observable<T | undefined>; | ||
/** | ||
@@ -227,3 +227,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
watch<T = string>(key: string, schema: JSONSchemaString): Observable<string | undefined>; | ||
watch<T extends number = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<number | undefined>; | ||
watch<T extends number = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<T | undefined>; | ||
/** | ||
@@ -234,3 +234,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
watch<T = number>(key: string, schema: JSONSchemaInteger | JSONSchemaNumber): Observable<number | undefined>; | ||
watch<T extends boolean = boolean>(key: string, schema: JSONSchemaBoolean): Observable<boolean | undefined>; | ||
watch<T extends boolean = boolean>(key: string, schema: JSONSchemaBoolean): Observable<T | undefined>; | ||
/** | ||
@@ -241,3 +241,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
watch<T = boolean>(key: string, schema: JSONSchemaBoolean): Observable<boolean | undefined>; | ||
watch<T extends string[] = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<string[] | undefined>; | ||
watch<T extends readonly string[] = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<T | undefined>; | ||
/** | ||
@@ -248,3 +248,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
watch<T = string[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaString>): Observable<string[] | undefined>; | ||
watch<T extends number[] = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<number[] | undefined>; | ||
watch<T extends readonly number[] = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<T | undefined>; | ||
/** | ||
@@ -255,3 +255,3 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. | ||
watch<T = number[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaInteger | JSONSchemaNumber>): Observable<number[] | undefined>; | ||
watch<T extends boolean[] = boolean[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaBoolean>): Observable<boolean[] | undefined>; | ||
watch<T extends readonly boolean[] = boolean[]>(key: string, schema: JSONSchemaArrayOf<JSONSchemaBoolean>): Observable<T | undefined>; | ||
/** | ||
@@ -258,0 +258,0 @@ * @deprecated The cast is useless here and doesn't match the JSON schema. Just remove the cast. |
@@ -29,3 +29,3 @@ /** | ||
*/ | ||
enum?: number[]; | ||
enum?: readonly number[]; | ||
/** | ||
@@ -68,3 +68,3 @@ * Check if a number is a multiple of x. | ||
*/ | ||
enum?: number[]; | ||
enum?: readonly number[]; | ||
/** | ||
@@ -107,3 +107,3 @@ * Check if a number is a multiple of x. | ||
*/ | ||
enum?: string[]; | ||
enum?: readonly string[]; | ||
/** | ||
@@ -136,3 +136,3 @@ * Maxium length for a string. | ||
*/ | ||
items: JSONSchema | JSONSchema[]; | ||
items: JSONSchema | readonly JSONSchema[]; | ||
/** | ||
@@ -202,3 +202,3 @@ * Check if an array length is lower or equal to this value. | ||
*/ | ||
required?: string[]; | ||
required?: readonly string[]; | ||
} | ||
@@ -205,0 +205,0 @@ /** |
{ | ||
"name": "@ngx-pwa/local-storage", | ||
"version": "11.0.0-0", | ||
"version": "11.0.0-1", | ||
"funding": { | ||
@@ -5,0 +5,0 @@ "type": "github", |
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 not supported yet
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
737808
5945