Skip to content
This repository was archived by the owner on Jul 20, 2021. It is now read-only.

Commit 44084f8

Browse files
author
Per Kristian Kummermo
committed
feat(datamapperchain): add meta field
1 parent ea9f219 commit 44084f8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/DataMapperChain.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export interface IDataMapperChainConfig {
1616
* Optional name of the DataMapperChain
1717
*/
1818
name?: string;
19+
20+
/**
21+
* Optional meta information to put on mapper
22+
*/
23+
meta?: object;
1924
}
2025

2126
/**
@@ -35,6 +40,7 @@ export class DataMapperChain {
3540
mappers: IMapper[] = [];
3641
initialValue: IDataValue = "";
3742
name: string = "";
43+
meta: object = {};
3844

3945
/**
4046
* Create a new instance of a DataMapperChain.
@@ -43,9 +49,11 @@ export class DataMapperChain {
4349
constructor({
4450
mappers = [],
4551
name = "",
46-
}: IDataMapperChainConfig = { mappers, name }) {
52+
meta = {},
53+
}: IDataMapperChainConfig = { mappers, name, meta }) {
4754
this.name = name;
4855
this.mappers = mappers;
56+
this.meta = meta;
4957
}
5058

5159
/**

0 commit comments

Comments
 (0)