{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/1222","repository_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib","labels_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/1222/labels{/name}","comments_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/1222/comments","events_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/1222/events","html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/issues/1222","id":361321777,"node_id":"MDU6SXNzdWUzNjEzMjE3Nzc=","number":1222,"title":"Browserify creates a file with require statements.","user":{"login":"davidapple","id":5597784,"node_id":"MDQ6VXNlcjU1OTc3ODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5597784?v=4","gravatar_id":"","url":"https://api.github.com/users/davidapple","html_url":"https://github.com/davidapple","followers_url":"https://api.github.com/users/davidapple/followers","following_url":"https://api.github.com/users/davidapple/following{/other_user}","gists_url":"https://api.github.com/users/davidapple/gists{/gist_id}","starred_url":"https://api.github.com/users/davidapple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidapple/subscriptions","organizations_url":"https://api.github.com/users/davidapple/orgs","repos_url":"https://api.github.com/users/davidapple/repos","events_url":"https://api.github.com/users/davidapple/events{/privacy}","received_events_url":"https://api.github.com/users/davidapple/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-18T14:05:35Z","updated_at":"2018-09-19T03:45:56Z","closed_at":"2018-09-19T03:45:56Z","author_association":"NONE","body":"When I run `browserify bitcoinjs-lib > bitcoinjs-lib.js`\r\n\r\nI get a huge file that doesn't work in the browser end because it contains require() statements.\r\n\r\n```\r\nrequire=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\r\n// base-x encoding\r\n// Forked from https://github.com/cryptocoinjs/bs58\r\n// Originally written by Mike Hearn for BitcoinJ\r\n// Copyright (c) 2011 Google Inc\r\n// Ported to JavaScript by Stefan Thomas\r\n// Merged Buffer refactorings from base58-native by Stephen Pair\r\n// Copyright (c) 2013 BitPay Inc\r\n\r\nvar Buffer = require('safe-buffer').Buffer\r\n\r\nmodule.exports = function base (ALPHABET) {\r\n  var ALPHABET_MAP = {}\r\n  var BASE = ALPHABET.length\r\n  var LEADER = ALPHABET.charAt(0)\r\n\r\n  // pre-compute lookup table\r\n  for (var z = 0; z < ALPHABET.length; z++) {\r\n    var x = ALPHABET.charAt(z)\r\n\r\n    if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\r\n    ALPHABET_MAP[x] = z\r\n  }\r\n```\r\n\r\nThis is the first 40 lines. The complete file is 21718 lines."},"comment":{"url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/comments/422640807","html_url":"https://github.com/bitcoinjs/bitcoinjs-lib/issues/1222#issuecomment-422640807","issue_url":"https://api.github.com/repos/bitcoinjs/bitcoinjs-lib/issues/1222","id":422640807,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjY0MDgwNw==","user":{"login":"dcousens","id":413395,"node_id":"MDQ6VXNlcjQxMzM5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/413395?v=4","gravatar_id":"","url":"https://api.github.com/users/dcousens","html_url":"https://github.com/dcousens","followers_url":"https://api.github.com/users/dcousens/followers","following_url":"https://api.github.com/users/dcousens/following{/other_user}","gists_url":"https://api.github.com/users/dcousens/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousens/subscriptions","organizations_url":"https://api.github.com/users/dcousens/orgs","repos_url":"https://api.github.com/users/dcousens/repos","events_url":"https://api.github.com/users/dcousens/events{/privacy}","received_events_url":"https://api.github.com/users/dcousens/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T03:45:56Z","updated_at":"2018-09-19T03:45:56Z","author_association":"MEMBER","body":"https://stackoverflow.com/questions/32604311/how-to-create-standalone-browserify-bundle-exporting-directly-to-window#33764505"}}
{"actor":{"display_login":"dcousens"}}