UNPKG

@ngx-pwa/local-storage

Version:

Efficient local storage module for Angular: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.

34 lines 1.74 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateToV9 = exports.updateToV8 = void 0; const schematics_1 = require("@angular-devkit/schematics"); const config_1 = require("../utility/config"); const module_1 = require("../utility/module"); function updateToV8() { return (host) => __awaiter(this, void 0, void 0, function* () { /* Get config */ const mainPaths = yield config_1.getAllMainPaths(host); /* Update `AppModule` of all projects */ return schematics_1.chain(mainPaths.map((mainPath) => module_1.updateModule(mainPath))); }); } exports.updateToV8 = updateToV8; function updateToV9() { return (host) => __awaiter(this, void 0, void 0, function* () { /* Get config */ const mainPaths = yield config_1.getAllMainPaths(host); /* Update `AppModule` of all projects */ return schematics_1.chain(mainPaths.map((mainPath) => module_1.updateModule(mainPath))); }); } exports.updateToV9 = updateToV9; //# sourceMappingURL=index.js.map