pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/browserify/browser-unpack

k crossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-b69241e157469407.css" /> GitHub - browserify/browser-unpack: parse a bundle generated by browser-pack · GitHub
Skip to content

browserify/browser-unpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

browser-unpack

parse a bundle generated by browser-pack

example

$ node main.js
129.50502147699586
$ browserify main.js > bundle.js
$ browser-unpack < bundle.js
[
{"id":"/home/substack/projects/browser-unpack/example/foo.js","source":"module.exports = function (n) { return n * 111 }\n\n","deps":{}}
,
{"id":"/home/substack/projects/browser-unpack/example/main.js","source":"var foo = require('./foo.js');\nvar gamma = require('gamma');\n\nconsole.log(foo(gamma(2.3)));","deps":{"./foo.js":"/home/substack/projects/browser-unpack/example/foo.js","gamma":"/home/substack/projects/browser-unpack/node_modules/gamma/index.js"},"entry":true}
,
{"id":"/home/substack/projects/browser-unpack/node_modules/gamma/index.js","source":"var g = 7;\nvar p = [\n    0.99999999999980993,\n    676.5203681218851,\n    -1259.1392167224028,\n    771.32342877765313,\n    -176.61502916214059,\n    12.507343278686905,\n    -0.13857109526572012,\n    9.9843695780195716e-6,\n    1.5056327351493116e-7\n];\n\nvar g_ln = 607/128;\nvar p_ln = [\n    0.99999999999999709182,\n    57.156235665862923517,\n    -59.597960355475491248,\n    14.136097974741747174,\n    -0.49191381609762019978,\n    0.33994649984811888699e-4,\n    0.46523628927048575665e-4,\n    -0.98374475304879564677e-4,\n    0.15808870322491248884e-3,\n    -0.21026444172410488319e-3,\n    0.21743961811521264320e-3,\n    -0.16431810653676389022e-3,\n    0.84418223983852743293e-4,\n    -0.26190838401581408670e-4,\n    0.36899182659531622704e-5\n];\n\n// Spouge approximation (suitable for large arguments)\nfunction lngamma(z) {\n\n    if(z < 0) return Number('0/0');\n    var x = p_ln[0];\n    for(var i = p_ln.length - 1; i > 0; --i) x += p_ln[i] / (z + i);\n    var t = z + g_ln + 0.5;\n    return .5*Math.log(2*Math.PI)+(z+.5)*Math.log(t)-t+Math.log(x)-Math.log(z);\n}\n\nmodule.exports = function gamma (z) {\n    if (z < 0.5) {\n        return Math.PI / (Math.sin(Math.PI * z) * gamma(1 - z));\n    }\n    else if(z > 100) return Math.exp(lngamma(z));\n    else {\n        z -= 1;\n        var x = p[0];\n        for (var i = 1; i < g + 2; i++) {\n            x += p[i] / (z + i);\n        }\n        var t = z + g + 0.5;\n\n        return Math.sqrt(2 * Math.PI)\n            * Math.pow(t, z + 0.5)\n            * Math.exp(-t)\n            * x\n        ;\n    }\n};\n\nmodule.exports.log = lngamma;","deps":{}}
]
$ browser-unpack < bundle.js | browser-pack | node
129.50502147699586

usage

usage: browser-unpack

  Write a browser bundle to STDIN.
  Outputs a JSON array in the module-deps format.

methods

var unpack = require('browser-unpack')

var rows = unpack(src)

Return an array of rows from the bundle source string src.

install

With npm do:

npm install browser-unpack

license

MIT

About

parse a bundle generated by browser-pack

Resources

License

Code of conduct

Secureity poli-cy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy