docs: function insert() {
    var context     = null;
    var position    = null;
    var content     = void 0;
    var cardinality = null;
  
    var argLen = arguments.length;
    for (var i=0; i < argLen; i++) {
      var arg = arguments[i];
      if (i === 0) {
        context = arg;
        continue;
      }
      if (arg === null && content === void 0) {
        content = arg;
        continue;
      }
      var isString = (typeof arg === 'string' || arg instanceof String);
      if (isString) {
        if (position === null && /^(before|after|last-child)$/.test(arg)) {
          position = arg;
          continue;
        }
        if (cardinality === null && /^[?.*+]$/.test(arg)) {
          cardinality = arg;
          continue;
        }
      }
      if (content === void 0) {
        content = arg;
        continue;
      }
      break;
    }
  
    if (context === null || position === null || content === void 0) {
      throw new Error(
          'insert takes context, position, content, and optional cardinality'
          );
    }
  
    var operation = {
      context:  context,
      position: position,
      content:  content
    };
    if (cardinality !== null) {
      operation.cardinality = cardinality;
    }
  
    return {insert: operation};
  }