@jam-comments/server-utilities 5.8.2 → 5.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logError = exports.log = exports.removeFalseyValues = exports.fetchAll = exports.markupFetcher = void 0;
6
+ exports.store = exports.logError = exports.log = exports.removeFalseyValues = exports.fetchAll = exports.markupFetcher = void 0;
7
+ const store_1 = __importDefault(require("./store"));
8
+ exports.store = store_1.default;
4
9
  var markupFetcher_1 = require("./markupFetcher");
5
10
  Object.defineProperty(exports, "markupFetcher", { enumerable: true, get: function () { return markupFetcher_1.markupFetcher; } });
6
11
  Object.defineProperty(exports, "fetchAll", { enumerable: true, get: function () { return markupFetcher_1.fetchAll; } });
package/dist/cjs/store.js CHANGED
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  let STORE = null;
4
4
  const store = {
5
5
  init() {
6
- STORE = new Map();
6
+ if (!STORE) {
7
+ STORE = new Map();
8
+ }
7
9
  },
8
10
  isInitialized() {
9
11
  return STORE !== null;
package/dist/esm/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ import store from "./store";
1
2
  export { markupFetcher, fetchAll } from "./markupFetcher";
2
3
  export { removeFalseyValues } from "./utils";
3
4
  export { log, logError } from "./log";
5
+ export { store };
package/dist/esm/store.js CHANGED
@@ -1,7 +1,9 @@
1
1
  let STORE = null;
2
2
  const store = {
3
3
  init() {
4
- STORE = new Map();
4
+ if (!STORE) {
5
+ STORE = new Map();
6
+ }
5
7
  },
6
8
  isInitialized() {
7
9
  return STORE !== null;
@@ -1,4 +1,6 @@
1
1
  export type { CustomCopy } from "./markupFetcher";
2
+ import store from "./store";
2
3
  export { markupFetcher, fetchAll } from "./markupFetcher";
3
4
  export { removeFalseyValues } from "./utils";
4
5
  export { log, logError } from "./log";
6
+ export { store };
@@ -2,9 +2,9 @@ declare const store: {
2
2
  init(): void;
3
3
  isInitialized(): boolean;
4
4
  set(path: string, markup: string): void;
5
- get(path: string): string;
5
+ get(path: string): any;
6
6
  clear(): void;
7
- getEmptyMarkup(): string;
7
+ getEmptyMarkup(): any;
8
8
  toPathKey(path: string): string;
9
9
  };
10
10
  export default store;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jam-comments/server-utilities",
3
- "version": "5.8.2",
3
+ "version": "5.9.0",
4
4
  "description": "Various JavaScript utilities for JamComments.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",