code: function Load(pgn) {
    let chess = null;
    if (Chess.Chess) {
      chess = new Chess.Chess();
    } else {
      chess = new Chess();
    }
    chess.load_pgn(pgn);
    return chess;
  }
docs: Helper to instantiate chess.js correctly on both browser and Node.