INNER CODE UNIT · JavaScript

getArgumentsAndValidationContext

Meteor-Community-Packages/meteor-collection2 · package/collection2/main.js:356

async function getArgumentsAndValidationContext(methodName, args) {
    let options = isInsertType(methodName) ? args[1] : args[2];

    // Support missing options arg
    if (!options || typeof options === 'function') {
       options = {};
    }

    let validationContext = {};
    let validator;
    let validatedArgs = args;
    if (this._c2 && options.bypassCollection2 !== true) {
       let userId = null;
       try {
          // https://github.com/aldeed/meteor-collection2/issues/175
         userId = Meteor.userId();
       } catch (err) {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…