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

Commit

Permalink
feat(datamapperchain): add meta field
Browse files Browse the repository at this point in the history
  • Loading branch information
Per Kristian Kummermo committed Nov 26, 2018
1 parent ea9f219 commit 44084f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/DataMapperChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export interface IDataMapperChainConfig {
* Optional name of the DataMapperChain
*/
name?: string;

/**
* Optional meta information to put on mapper
*/
meta?: object;
}

/**
Expand All @@ -35,6 +40,7 @@ export class DataMapperChain {
mappers: IMapper[] = [];
initialValue: IDataValue = "";
name: string = "";
meta: object = {};

/**
* Create a new instance of a DataMapperChain.
Expand All @@ -43,9 +49,11 @@ export class DataMapperChain {
constructor({
mappers = [],
name = "",
}: IDataMapperChainConfig = { mappers, name }) {
meta = {},
}: IDataMapperChainConfig = { mappers, name, meta }) {
this.name = name;
this.mappers = mappers;
this.meta = meta;
}

/**
Expand Down

0 comments on commit 44084f8

Please sign in to comment.