cjs2es6export.js
function(node) {
    if (node.type !== 'AssignmentExpression') return false;

    return node.left.type === 'MemberExpression' &&
      node.left.object.type === 'Identifier' && node.left.object.name === 'module' &&
      node.left.property.type === 'Identifier' && node.left.property.name === 'exports';
    // TODO: detect module.exports.foo = (or exports.foo =) property assignments, non-default exports
  }
function(node) {
    if (node.type !== 'AssignmentExpression') return false;

    return node.left.type === 'MemberExpression' &&
      node.left.object.type === 'Identifier' && node.left.object.name === 'module' &&
      node.left.property.type === 'Identifier' && node.left.property.name === 'exports';
    // TODO: detect module.exports.foo = (or exports.foo =) property assignments, non-default exports
  }
function ( node ) { if ( node . type !== 'AssignmentExpression' ) return false ; return node . left . type === 'MemberExpression' && node . left . object . type === 'Identifier' && node . left . object . name === 'module' && node . left . property . type === 'Identifier' && node . left . property . name === 'exports' ; // TODO: detect module.exports.foo = (or exports.foo =) property assignments, non-default exports }
module.exports =
module . exports =