src/index.js
function requireFunc() {
    if (typeof arguments[0] === 'string') {
      const dep = arguments[0];
      const got = defined(dep);
      if (got) return got.val;
      throw new Error(`commonjs dependency "${dep}" is not prepared.`);
    }

    return requirejs.apply(null, arguments);
  }
function requireFunc() {
    if (typeof arguments[0] === 'string') {
      const dep = arguments[0];
      const got = defined(dep);
      if (got) return got.val;
      throw new Error(`commonjs dependency "${dep}" is not prepared.`);
    }

    return requirejs.apply(null, arguments);
  }
function requireFunc ( ) { if ( typeof arguments [ 0 ] === 'string' ) { const dep = arguments [ 0 ] ; const got = defined ( dep ) ; if ( got ) return got . val ; throw new Error ( ` ${ dep } ` ) ; } return requirejs . apply ( null , arguments ) ; }
return AMD require function or commonjs require function
return AMD require function or commonjs require function