lib/mongo-object.js
function extractOp(position) {
  const firstPositionPiece = position.slice(0, position.indexOf('['));
  return (firstPositionPiece.substring(0, 1) === '$') ? firstPositionPiece : null;
}
function extractOp(position) {
  const firstPositionPiece = position.slice(0, position.indexOf('['));
  return (firstPositionPiece.substring(0, 1) === '$') ? firstPositionPiece : null;
}
function extractOp ( position ) { const firstPositionPiece = position . slice ( 0 , position . indexOf ( '[' ) ) ; return ( firstPositionPiece . substring ( 0 , 1 ) === '$' ) ? firstPositionPiece : null ; }
Extracts operator piece, if present, from position string
Extracts operator piece if present from position string