first commit

This commit is contained in:
编码猿
2024-09-27 01:15:47 +08:00
commit 8be1fcce6b
155 changed files with 9435 additions and 0 deletions

19
json-mapper-class/dist/store.js vendored Normal file
View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setStore = exports.keyStores = exports.originalKeyStores = void 0;
const store = new Map();
exports.originalKeyStores = new Map();
exports.keyStores = new Map();
exports.setStore = (target, options) => {
const { key, ...rest } = options;
const storeKey = target.constructor;
const targetStore = store.has(storeKey) ? store.get(storeKey) : new Map();
let value = targetStore.has(key) ? targetStore.get(key) : {};
value = {
...value,
...rest,
};
targetStore.set(key, value);
store.set(storeKey, targetStore);
};
exports.default = store;