applesign
Version:
API to resign IPA files
13 lines (12 loc) • 321 B
JavaScript
module.exports = function (args, types) {
if (args.length !== types.length) {
throw new Error('Incorrect arguments count');
}
const stack = [...args].reverse();
for (const t of types) {
const arg = typeof stack.pop();
if (t && arg !== t) {
throw new Error('Invalid argument type');
}
}
};