sm-utility 2.3.7 → 2.3.8

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.
@@ -37,3 +37,4 @@ export declare function shortUniqueId(): string;
37
37
  * const clonedComplex = copy(complex);
38
38
  */
39
39
  export declare function copy<T>(obj: T): T;
40
+ export { MetadataModel, IMetadata } from './metadata.model';
package/general/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.copy = exports.shortUniqueId = exports.mergeDeep = exports.timeout = exports.randomSixDigitNumber = exports.pipe = void 0;
3
+ exports.MetadataModel = exports.copy = exports.shortUniqueId = exports.mergeDeep = exports.timeout = exports.randomSixDigitNumber = exports.pipe = void 0;
4
4
  const nanoid_1 = require("nanoid");
5
5
  function pipe(...fns) {
6
6
  return (x) => fns.reduce((v, f) => f(v), x);
@@ -102,3 +102,5 @@ function copy(obj) {
102
102
  return clone;
103
103
  }
104
104
  exports.copy = copy;
105
+ var metadata_model_1 = require("./metadata.model");
106
+ Object.defineProperty(exports, "MetadataModel", { enumerable: true, get: function () { return metadata_model_1.MetadataModel; } });
@@ -0,0 +1,9 @@
1
+ export interface IMetadata {
2
+ auditUuid: string;
3
+ }
4
+ export declare class MetadataModel {
5
+ private metadata;
6
+ constructor(metadata: IMetadata);
7
+ getData(): IMetadata;
8
+ getAuditUuid(): string;
9
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetadataModel = void 0;
4
+ class MetadataModel {
5
+ constructor(metadata) {
6
+ this.metadata = metadata;
7
+ }
8
+ getData() {
9
+ return this.metadata;
10
+ }
11
+ getAuditUuid() {
12
+ return this.metadata.auditUuid;
13
+ }
14
+ }
15
+ exports.MetadataModel = MetadataModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sm-utility",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "description": "reusable utility codes for sm projects",
5
5
  "main": "index.js",
6
6
  "types": "./index.d.ts",