browsed 0.3.0 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +27 -27
  3. data/browsed.gemspec +2 -3
  4. data/lib/browsed.rb +1 -1
  5. data/lib/browsed/chrome.rb +2 -2
  6. data/lib/browsed/client.rb +2 -2
  7. data/lib/browsed/firefox.rb +2 -2
  8. data/lib/browsed/version.rb +1 -1
  9. metadata +11 -164
  10. data/lib/browsed/proxies/proxy-chain-server/node_modules/.bin/portastic +0 -1
  11. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/LICENSE +0 -21
  12. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/README.md +0 -57
  13. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/changelog.md +0 -1
  14. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.core.js +0 -3824
  15. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.core.min.js +0 -31
  16. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.js +0 -5666
  17. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/browser/bluebird.min.js +0 -31
  18. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/any.js +0 -21
  19. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/assert.js +0 -55
  20. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/async.js +0 -165
  21. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/bind.js +0 -67
  22. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/bluebird.js +0 -11
  23. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/call_get.js +0 -123
  24. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/cancel.js +0 -129
  25. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/catch_filter.js +0 -42
  26. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/context.js +0 -69
  27. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/debuggability.js +0 -934
  28. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/direct_resolve.js +0 -46
  29. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/each.js +0 -30
  30. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/errors.js +0 -116
  31. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/es5.js +0 -80
  32. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/filter.js +0 -12
  33. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/finally.js +0 -146
  34. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/generators.js +0 -223
  35. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/join.js +0 -168
  36. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/map.js +0 -168
  37. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/method.js +0 -55
  38. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/nodeback.js +0 -51
  39. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/nodeify.js +0 -58
  40. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/promise.js +0 -789
  41. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/promise_array.js +0 -185
  42. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/promisify.js +0 -314
  43. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/props.js +0 -118
  44. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/queue.js +0 -73
  45. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/race.js +0 -49
  46. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/reduce.js +0 -172
  47. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/schedule.js +0 -62
  48. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/settle.js +0 -43
  49. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/some.js +0 -148
  50. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/synchronous_inspection.js +0 -103
  51. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/thenables.js +0 -86
  52. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/timers.js +0 -93
  53. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/using.js +0 -226
  54. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/js/release/util.js +0 -389
  55. data/lib/browsed/proxies/proxy-chain-server/node_modules/bluebird/package.json +0 -102
  56. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/CHANGELOG.md +0 -408
  57. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/LICENSE +0 -22
  58. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/Readme.md +0 -428
  59. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/index.js +0 -1224
  60. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/package.json +0 -70
  61. data/lib/browsed/proxies/proxy-chain-server/node_modules/commander/typings/index.d.ts +0 -310
  62. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/.coveralls.yml +0 -1
  63. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/.eslintrc +0 -11
  64. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/.npmignore +0 -9
  65. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/.travis.yml +0 -14
  66. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/CHANGELOG.md +0 -362
  67. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/LICENSE +0 -19
  68. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/Makefile +0 -50
  69. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/README.md +0 -312
  70. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/component.json +0 -19
  71. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/karma.conf.js +0 -70
  72. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/node.js +0 -1
  73. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/package.json +0 -88
  74. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/src/browser.js +0 -185
  75. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/src/debug.js +0 -202
  76. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/src/index.js +0 -10
  77. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/src/inspector-log.js +0 -15
  78. data/lib/browsed/proxies/proxy-chain-server/node_modules/debug/src/node.js +0 -248
  79. data/lib/browsed/proxies/proxy-chain-server/node_modules/ms/index.js +0 -152
  80. data/lib/browsed/proxies/proxy-chain-server/node_modules/ms/license.md +0 -21
  81. data/lib/browsed/proxies/proxy-chain-server/node_modules/ms/package.json +0 -69
  82. data/lib/browsed/proxies/proxy-chain-server/node_modules/ms/readme.md +0 -51
  83. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/LICENSE +0 -13
  84. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/README.md +0 -148
  85. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/bin/portastic +0 -65
  86. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/history.md +0 -7
  87. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/index.js +0 -4
  88. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/lib/monitor.js +0 -59
  89. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/lib/portastic.js +0 -167
  90. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/LICENSE +0 -21
  91. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/README.md +0 -677
  92. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/changelog.md +0 -1730
  93. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/browser/bluebird.js +0 -4892
  94. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/browser/bluebird.min.js +0 -31
  95. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/any.js +0 -21
  96. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/assert.js +0 -55
  97. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/async.js +0 -150
  98. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/bind.js +0 -72
  99. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/bluebird.js +0 -11
  100. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/call_get.js +0 -123
  101. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/cancel.js +0 -48
  102. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/captured_trace.js +0 -493
  103. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/catch_filter.js +0 -66
  104. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/context.js +0 -38
  105. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/debuggability.js +0 -162
  106. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/direct_resolve.js +0 -63
  107. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/each.js +0 -12
  108. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/errors.js +0 -111
  109. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/es5.js +0 -80
  110. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/filter.js +0 -12
  111. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/finally.js +0 -98
  112. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/generators.js +0 -136
  113. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/join.js +0 -107
  114. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/map.js +0 -133
  115. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/method.js +0 -44
  116. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/nodeify.js +0 -59
  117. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/progress.js +0 -76
  118. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/promise.js +0 -759
  119. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/promise_array.js +0 -142
  120. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/promise_resolver.js +0 -123
  121. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/promisify.js +0 -307
  122. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/props.js +0 -79
  123. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/queue.js +0 -90
  124. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/race.js +0 -47
  125. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/reduce.js +0 -148
  126. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/schedule.js +0 -35
  127. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/settle.js +0 -40
  128. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/some.js +0 -125
  129. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/synchronous_inspection.js +0 -94
  130. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/thenables.js +0 -84
  131. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/timers.js +0 -64
  132. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/using.js +0 -213
  133. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/js/main/util.js +0 -321
  134. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/node_modules/bluebird/package.json +0 -103
  135. data/lib/browsed/proxies/proxy-chain-server/node_modules/portastic/package.json +0 -69
  136. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/CHANGELOG.md +0 -109
  137. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/LICENSE +0 -201
  138. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/README.md +0 -278
  139. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/anonymize_proxy.js +0 -100
  140. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_base.js +0 -319
  141. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_custom_response.js +0 -96
  142. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_forward.js +0 -173
  143. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_chain.js +0 -132
  144. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_direct.js +0 -89
  145. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/handler_tunnel_tcp_chain.js +0 -271
  146. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/index.js +0 -26
  147. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/run_locally.js +0 -66
  148. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/server.js +0 -595
  149. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/tcp_tunnel.js +0 -138
  150. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/testing_tcp_service.js +0 -37
  151. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/build/tools.js +0 -220
  152. data/lib/browsed/proxies/proxy-chain-server/node_modules/proxy-chain/package.json +0 -104
  153. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/LICENSE +0 -23
  154. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/README.md +0 -28
  155. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/package.json +0 -81
  156. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/underscore-min.js +0 -5
  157. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/underscore-min.js.map +0 -1
  158. data/lib/browsed/proxies/proxy-chain-server/node_modules/underscore/underscore.js +0 -1692
  159. data/lib/browsed/proxies/proxy-chain-server/package-lock.json +0 -63
  160. data/lib/browsed/proxies/proxy-chain-server/package.json +0 -15
  161. data/lib/browsed/proxies/proxy-chain-server/server.js +0 -25
  162. data/lib/browsed/proxies/proxy_chain.rb +0 -46
@@ -1 +0,0 @@
1
- module.exports = require('./src/node');
@@ -1,88 +0,0 @@
1
- {
2
- "_from": "debug@^2.2.0",
3
- "_id": "debug@2.6.9",
4
- "_inBundle": false,
5
- "_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
6
- "_location": "/debug",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "debug@^2.2.0",
12
- "name": "debug",
13
- "escapedName": "debug",
14
- "rawSpec": "^2.2.0",
15
- "saveSpec": null,
16
- "fetchSpec": "^2.2.0"
17
- },
18
- "_requiredBy": [
19
- "/portastic"
20
- ],
21
- "_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
22
- "_shasum": "5d128515df134ff327e90a4c93f4e077a536341f",
23
- "_spec": "debug@^2.2.0",
24
- "_where": "/Users/sebastianjohnsson/Programming/Javascript/proxy-chain-server/node_modules/portastic",
25
- "author": {
26
- "name": "TJ Holowaychuk",
27
- "email": "tj@vision-media.ca"
28
- },
29
- "browser": "./src/browser.js",
30
- "bugs": {
31
- "url": "https://github.com/visionmedia/debug/issues"
32
- },
33
- "bundleDependencies": false,
34
- "component": {
35
- "scripts": {
36
- "debug/index.js": "browser.js",
37
- "debug/debug.js": "debug.js"
38
- }
39
- },
40
- "contributors": [
41
- {
42
- "name": "Nathan Rajlich",
43
- "email": "nathan@tootallnate.net",
44
- "url": "http://n8.io"
45
- },
46
- {
47
- "name": "Andrew Rhyne",
48
- "email": "rhyneandrew@gmail.com"
49
- }
50
- ],
51
- "dependencies": {
52
- "ms": "2.0.0"
53
- },
54
- "deprecated": false,
55
- "description": "small debugging utility",
56
- "devDependencies": {
57
- "browserify": "9.0.3",
58
- "chai": "^3.5.0",
59
- "concurrently": "^3.1.0",
60
- "coveralls": "^2.11.15",
61
- "eslint": "^3.12.1",
62
- "istanbul": "^0.4.5",
63
- "karma": "^1.3.0",
64
- "karma-chai": "^0.1.0",
65
- "karma-mocha": "^1.3.0",
66
- "karma-phantomjs-launcher": "^1.0.2",
67
- "karma-sinon": "^1.0.5",
68
- "mocha": "^3.2.0",
69
- "mocha-lcov-reporter": "^1.2.0",
70
- "rimraf": "^2.5.4",
71
- "sinon": "^1.17.6",
72
- "sinon-chai": "^2.8.0"
73
- },
74
- "homepage": "https://github.com/visionmedia/debug#readme",
75
- "keywords": [
76
- "debug",
77
- "log",
78
- "debugger"
79
- ],
80
- "license": "MIT",
81
- "main": "./src/index.js",
82
- "name": "debug",
83
- "repository": {
84
- "type": "git",
85
- "url": "git://github.com/visionmedia/debug.git"
86
- },
87
- "version": "2.6.9"
88
- }
@@ -1,185 +0,0 @@
1
- /**
2
- * This is the web browser implementation of `debug()`.
3
- *
4
- * Expose `debug()` as the module.
5
- */
6
-
7
- exports = module.exports = require('./debug');
8
- exports.log = log;
9
- exports.formatArgs = formatArgs;
10
- exports.save = save;
11
- exports.load = load;
12
- exports.useColors = useColors;
13
- exports.storage = 'undefined' != typeof chrome
14
- && 'undefined' != typeof chrome.storage
15
- ? chrome.storage.local
16
- : localstorage();
17
-
18
- /**
19
- * Colors.
20
- */
21
-
22
- exports.colors = [
23
- 'lightseagreen',
24
- 'forestgreen',
25
- 'goldenrod',
26
- 'dodgerblue',
27
- 'darkorchid',
28
- 'crimson'
29
- ];
30
-
31
- /**
32
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
33
- * and the Firebug extension (any Firefox version) are known
34
- * to support "%c" CSS customizations.
35
- *
36
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
37
- */
38
-
39
- function useColors() {
40
- // NB: In an Electron preload script, document will be defined but not fully
41
- // initialized. Since we know we're in Chrome, we'll just detect this case
42
- // explicitly
43
- if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
44
- return true;
45
- }
46
-
47
- // is webkit? http://stackoverflow.com/a/16459606/376773
48
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
49
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
50
- // is firebug? http://stackoverflow.com/a/398120/376773
51
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
52
- // is firefox >= v31?
53
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
54
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
55
- // double check webkit in userAgent just in case we are in a worker
56
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
57
- }
58
-
59
- /**
60
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
61
- */
62
-
63
- exports.formatters.j = function(v) {
64
- try {
65
- return JSON.stringify(v);
66
- } catch (err) {
67
- return '[UnexpectedJSONParseError]: ' + err.message;
68
- }
69
- };
70
-
71
-
72
- /**
73
- * Colorize log arguments if enabled.
74
- *
75
- * @api public
76
- */
77
-
78
- function formatArgs(args) {
79
- var useColors = this.useColors;
80
-
81
- args[0] = (useColors ? '%c' : '')
82
- + this.namespace
83
- + (useColors ? ' %c' : ' ')
84
- + args[0]
85
- + (useColors ? '%c ' : ' ')
86
- + '+' + exports.humanize(this.diff);
87
-
88
- if (!useColors) return;
89
-
90
- var c = 'color: ' + this.color;
91
- args.splice(1, 0, c, 'color: inherit')
92
-
93
- // the final "%c" is somewhat tricky, because there could be other
94
- // arguments passed either before or after the %c, so we need to
95
- // figure out the correct index to insert the CSS into
96
- var index = 0;
97
- var lastC = 0;
98
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
99
- if ('%%' === match) return;
100
- index++;
101
- if ('%c' === match) {
102
- // we only are interested in the *last* %c
103
- // (the user may have provided their own)
104
- lastC = index;
105
- }
106
- });
107
-
108
- args.splice(lastC, 0, c);
109
- }
110
-
111
- /**
112
- * Invokes `console.log()` when available.
113
- * No-op when `console.log` is not a "function".
114
- *
115
- * @api public
116
- */
117
-
118
- function log() {
119
- // this hackery is required for IE8/9, where
120
- // the `console.log` function doesn't have 'apply'
121
- return 'object' === typeof console
122
- && console.log
123
- && Function.prototype.apply.call(console.log, console, arguments);
124
- }
125
-
126
- /**
127
- * Save `namespaces`.
128
- *
129
- * @param {String} namespaces
130
- * @api private
131
- */
132
-
133
- function save(namespaces) {
134
- try {
135
- if (null == namespaces) {
136
- exports.storage.removeItem('debug');
137
- } else {
138
- exports.storage.debug = namespaces;
139
- }
140
- } catch(e) {}
141
- }
142
-
143
- /**
144
- * Load `namespaces`.
145
- *
146
- * @return {String} returns the previously persisted debug modes
147
- * @api private
148
- */
149
-
150
- function load() {
151
- var r;
152
- try {
153
- r = exports.storage.debug;
154
- } catch(e) {}
155
-
156
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
157
- if (!r && typeof process !== 'undefined' && 'env' in process) {
158
- r = process.env.DEBUG;
159
- }
160
-
161
- return r;
162
- }
163
-
164
- /**
165
- * Enable namespaces listed in `localStorage.debug` initially.
166
- */
167
-
168
- exports.enable(load());
169
-
170
- /**
171
- * Localstorage attempts to return the localstorage.
172
- *
173
- * This is necessary because safari throws
174
- * when a user disables cookies/localstorage
175
- * and you attempt to access it.
176
- *
177
- * @return {LocalStorage}
178
- * @api private
179
- */
180
-
181
- function localstorage() {
182
- try {
183
- return window.localStorage;
184
- } catch (e) {}
185
- }
@@ -1,202 +0,0 @@
1
-
2
- /**
3
- * This is the common logic for both the Node.js and web browser
4
- * implementations of `debug()`.
5
- *
6
- * Expose `debug()` as the module.
7
- */
8
-
9
- exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
10
- exports.coerce = coerce;
11
- exports.disable = disable;
12
- exports.enable = enable;
13
- exports.enabled = enabled;
14
- exports.humanize = require('ms');
15
-
16
- /**
17
- * The currently active debug mode names, and names to skip.
18
- */
19
-
20
- exports.names = [];
21
- exports.skips = [];
22
-
23
- /**
24
- * Map of special "%n" handling functions, for the debug "format" argument.
25
- *
26
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
27
- */
28
-
29
- exports.formatters = {};
30
-
31
- /**
32
- * Previous log timestamp.
33
- */
34
-
35
- var prevTime;
36
-
37
- /**
38
- * Select a color.
39
- * @param {String} namespace
40
- * @return {Number}
41
- * @api private
42
- */
43
-
44
- function selectColor(namespace) {
45
- var hash = 0, i;
46
-
47
- for (i in namespace) {
48
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
49
- hash |= 0; // Convert to 32bit integer
50
- }
51
-
52
- return exports.colors[Math.abs(hash) % exports.colors.length];
53
- }
54
-
55
- /**
56
- * Create a debugger with the given `namespace`.
57
- *
58
- * @param {String} namespace
59
- * @return {Function}
60
- * @api public
61
- */
62
-
63
- function createDebug(namespace) {
64
-
65
- function debug() {
66
- // disabled?
67
- if (!debug.enabled) return;
68
-
69
- var self = debug;
70
-
71
- // set `diff` timestamp
72
- var curr = +new Date();
73
- var ms = curr - (prevTime || curr);
74
- self.diff = ms;
75
- self.prev = prevTime;
76
- self.curr = curr;
77
- prevTime = curr;
78
-
79
- // turn the `arguments` into a proper Array
80
- var args = new Array(arguments.length);
81
- for (var i = 0; i < args.length; i++) {
82
- args[i] = arguments[i];
83
- }
84
-
85
- args[0] = exports.coerce(args[0]);
86
-
87
- if ('string' !== typeof args[0]) {
88
- // anything else let's inspect with %O
89
- args.unshift('%O');
90
- }
91
-
92
- // apply any `formatters` transformations
93
- var index = 0;
94
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
95
- // if we encounter an escaped % then don't increase the array index
96
- if (match === '%%') return match;
97
- index++;
98
- var formatter = exports.formatters[format];
99
- if ('function' === typeof formatter) {
100
- var val = args[index];
101
- match = formatter.call(self, val);
102
-
103
- // now we need to remove `args[index]` since it's inlined in the `format`
104
- args.splice(index, 1);
105
- index--;
106
- }
107
- return match;
108
- });
109
-
110
- // apply env-specific formatting (colors, etc.)
111
- exports.formatArgs.call(self, args);
112
-
113
- var logFn = debug.log || exports.log || console.log.bind(console);
114
- logFn.apply(self, args);
115
- }
116
-
117
- debug.namespace = namespace;
118
- debug.enabled = exports.enabled(namespace);
119
- debug.useColors = exports.useColors();
120
- debug.color = selectColor(namespace);
121
-
122
- // env-specific initialization logic for debug instances
123
- if ('function' === typeof exports.init) {
124
- exports.init(debug);
125
- }
126
-
127
- return debug;
128
- }
129
-
130
- /**
131
- * Enables a debug mode by namespaces. This can include modes
132
- * separated by a colon and wildcards.
133
- *
134
- * @param {String} namespaces
135
- * @api public
136
- */
137
-
138
- function enable(namespaces) {
139
- exports.save(namespaces);
140
-
141
- exports.names = [];
142
- exports.skips = [];
143
-
144
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
145
- var len = split.length;
146
-
147
- for (var i = 0; i < len; i++) {
148
- if (!split[i]) continue; // ignore empty strings
149
- namespaces = split[i].replace(/\*/g, '.*?');
150
- if (namespaces[0] === '-') {
151
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
152
- } else {
153
- exports.names.push(new RegExp('^' + namespaces + '$'));
154
- }
155
- }
156
- }
157
-
158
- /**
159
- * Disable debug output.
160
- *
161
- * @api public
162
- */
163
-
164
- function disable() {
165
- exports.enable('');
166
- }
167
-
168
- /**
169
- * Returns true if the given mode name is enabled, false otherwise.
170
- *
171
- * @param {String} name
172
- * @return {Boolean}
173
- * @api public
174
- */
175
-
176
- function enabled(name) {
177
- var i, len;
178
- for (i = 0, len = exports.skips.length; i < len; i++) {
179
- if (exports.skips[i].test(name)) {
180
- return false;
181
- }
182
- }
183
- for (i = 0, len = exports.names.length; i < len; i++) {
184
- if (exports.names[i].test(name)) {
185
- return true;
186
- }
187
- }
188
- return false;
189
- }
190
-
191
- /**
192
- * Coerce `val`.
193
- *
194
- * @param {Mixed} val
195
- * @return {Mixed}
196
- * @api private
197
- */
198
-
199
- function coerce(val) {
200
- if (val instanceof Error) return val.stack || val.message;
201
- return val;
202
- }