mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 21:25:26 +00:00
Added nfc method to push nfc properties to be patched
This commit is contained in:
12
index.js
12
index.js
@@ -401,6 +401,18 @@ class Pass {
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user