Added nfc method to push nfc properties to be patched

This commit is contained in:
alexandercerutti
2018-08-28 01:48:19 +02:00
parent 8313d9e9a0
commit dbb5dcc2a5

View File

@@ -401,6 +401,18 @@ class Pass {
return this; return this;
} }
nfc(...data) {
if (data.length === 1 && data[0] instanceof Array) {
data = data[0];
}
let valid = data.filter(d => d instanceof Object && schema.isValid(d, schema.constants.nfcDict));
this.props["nfc"] = valid;
return this;
}
/** /**
* Checks if pass model type is one of the supported ones * Checks if pass model type is one of the supported ones
* *