Changeset 79a0317 for imaps-frontend/node_modules/debug
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/debug
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/debug/package.json
r0c6b92a r79a0317 1 1 { 2 "name": "debug", 3 "version": "4.3.7", 4 "repository": { 5 "type": "git", 6 "url": "git://github.com/debug-js/debug.git" 2 "_from": "debug@^4.1.0", 3 "_id": "debug@4.4.0", 4 "_inBundle": false, 5 "_integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 6 "_location": "/debug", 7 "_phantomChildren": {}, 8 "_requested": { 9 "type": "range", 10 "registry": true, 11 "raw": "debug@^4.1.0", 12 "name": "debug", 13 "escapedName": "debug", 14 "rawSpec": "^4.1.0", 15 "saveSpec": null, 16 "fetchSpec": "^4.1.0" 7 17 }, 8 "description": "Lightweight debugging utility for Node.js and the browser", 9 "keywords": [ 10 "debug", 11 "log", 12 "debugger" 18 "_requiredBy": [ 19 "/@babel/core", 20 "/@babel/traverse" 13 21 ], 14 "files": [ 15 "src", 16 "LICENSE", 17 "README.md" 22 "_resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 23 "_shasum": "2b3f2aea2ffeb776477460267377dc8710faba8a", 24 "_spec": "debug@^4.1.0", 25 "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend/node_modules/@babel/core", 26 "author": { 27 "name": "Josh Junon", 28 "url": "https://github.com/qix-" 29 }, 30 "browser": "./src/browser.js", 31 "bugs": { 32 "url": "https://github.com/debug-js/debug/issues" 33 }, 34 "bundleDependencies": false, 35 "contributors": [ 36 { 37 "name": "TJ Holowaychuk", 38 "email": "tj@vision-media.ca" 39 }, 40 { 41 "name": "Nathan Rajlich", 42 "email": "nathan@tootallnate.net", 43 "url": "http://n8.io" 44 }, 45 { 46 "name": "Andrew Rhyne", 47 "email": "rhyneandrew@gmail.com" 48 } 18 49 ], 19 "author": "Josh Junon (https://github.com/qix-)",20 "contributors": [21 "TJ Holowaychuk <tj@vision-media.ca>",22 "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",23 "Andrew Rhyne <rhyneandrew@gmail.com>"24 ],25 "license": "MIT",26 "scripts": {27 "lint": "xo",28 "test": "npm run test:node && npm run test:browser && npm run lint",29 "test:node": "istanbul cover _mocha -- test.js test.node.js",30 "test:browser": "karma start --single-run",31 "test:coverage": "cat ./coverage/lcov.info | coveralls"32 },33 50 "dependencies": { 34 51 "ms": "^2.1.3" 35 52 }, 53 "deprecated": false, 54 "description": "Lightweight debugging utility for Node.js and the browser", 36 55 "devDependencies": { 37 56 "brfs": "^2.0.1", … … 48 67 "xo": "^0.23.0" 49 68 }, 69 "engines": { 70 "node": ">=6.0" 71 }, 72 "files": [ 73 "src", 74 "LICENSE", 75 "README.md" 76 ], 77 "homepage": "https://github.com/debug-js/debug#readme", 78 "keywords": [ 79 "debug", 80 "log", 81 "debugger" 82 ], 83 "license": "MIT", 84 "main": "./src/index.js", 85 "name": "debug", 50 86 "peerDependenciesMeta": { 51 87 "supports-color": { … … 53 89 } 54 90 }, 55 "main": "./src/index.js", 56 "browser": "./src/browser.js", 57 "engines": { 58 "node": ">=6.0" 91 "repository": { 92 "type": "git", 93 "url": "git://github.com/debug-js/debug.git" 94 }, 95 "scripts": { 96 "lint": "xo", 97 "test": "npm run test:node && npm run test:browser && npm run lint", 98 "test:browser": "karma start --single-run", 99 "test:coverage": "cat ./coverage/lcov.info | coveralls", 100 "test:node": "istanbul cover _mocha -- test.js test.node.js" 101 }, 102 "version": "4.4.0", 103 "xo": { 104 "rules": { 105 "import/extensions": "off" 106 } 59 107 } 60 108 } -
imaps-frontend/node_modules/debug/src/browser.js
r0c6b92a r79a0317 130 130 // Is webkit? http://stackoverflow.com/a/16459606/376773 131 131 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 132 // eslint-disable-next-line no-return-assign 132 133 return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || 133 134 // Is firebug? http://stackoverflow.com/a/398120/376773 -
imaps-frontend/node_modules/debug/src/common.js
r0c6b92a r79a0317 167 167 createDebug.skips = []; 168 168 169 let i; 170 const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); 171 const len = split.length; 172 173 for (i = 0; i < len; i++) { 174 if (!split[i]) { 175 // ignore empty strings 176 continue; 177 } 178 179 namespaces = split[i].replace(/\*/g, '.*?'); 180 181 if (namespaces[0] === '-') { 182 createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); 169 const split = (typeof namespaces === 'string' ? namespaces : '') 170 .trim() 171 .replace(' ', ',') 172 .split(',') 173 .filter(Boolean); 174 175 for (const ns of split) { 176 if (ns[0] === '-') { 177 createDebug.skips.push(ns.slice(1)); 183 178 } else { 184 createDebug.names.push(new RegExp('^' + namespaces + '$')); 185 } 186 } 179 createDebug.names.push(ns); 180 } 181 } 182 } 183 184 /** 185 * Checks if the given string matches a namespace template, honoring 186 * asterisks as wildcards. 187 * 188 * @param {String} search 189 * @param {String} template 190 * @return {Boolean} 191 */ 192 function matchesTemplate(search, template) { 193 let searchIndex = 0; 194 let templateIndex = 0; 195 let starIndex = -1; 196 let matchIndex = 0; 197 198 while (searchIndex < search.length) { 199 if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { 200 // Match character or proceed with wildcard 201 if (template[templateIndex] === '*') { 202 starIndex = templateIndex; 203 matchIndex = searchIndex; 204 templateIndex++; // Skip the '*' 205 } else { 206 searchIndex++; 207 templateIndex++; 208 } 209 } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition 210 // Backtrack to the last '*' and try to match more characters 211 templateIndex = starIndex + 1; 212 matchIndex++; 213 searchIndex = matchIndex; 214 } else { 215 return false; // No match 216 } 217 } 218 219 // Handle trailing '*' in template 220 while (templateIndex < template.length && template[templateIndex] === '*') { 221 templateIndex++; 222 } 223 224 return templateIndex === template.length; 187 225 } 188 226 … … 195 233 function disable() { 196 234 const namespaces = [ 197 ...createDebug.names .map(toNamespace),198 ...createDebug.skips.map( toNamespace).map(namespace => '-' + namespace)235 ...createDebug.names, 236 ...createDebug.skips.map(namespace => '-' + namespace) 199 237 ].join(','); 200 238 createDebug.enable(''); … … 210 248 */ 211 249 function enabled(name) { 212 if (name[name.length - 1] === '*') { 213 return true; 214 } 215 216 let i; 217 let len; 218 219 for (i = 0, len = createDebug.skips.length; i < len; i++) { 220 if (createDebug.skips[i].test(name)) { 250 for (const skip of createDebug.skips) { 251 if (matchesTemplate(name, skip)) { 221 252 return false; 222 253 } 223 254 } 224 255 225 for ( i = 0, len = createDebug.names.length; i < len; i++) {226 if ( createDebug.names[i].test(name)) {256 for (const ns of createDebug.names) { 257 if (matchesTemplate(name, ns)) { 227 258 return true; 228 259 } … … 230 261 231 262 return false; 232 }233 234 /**235 * Convert regexp to namespace236 *237 * @param {RegExp} regxep238 * @return {String} namespace239 * @api private240 */241 function toNamespace(regexp) {242 return regexp.toString()243 .substring(2, regexp.toString().length - 2)244 .replace(/\.\*\?$/, '*');245 263 } 246 264
Note:
See TracChangeset
for help on using the changeset viewer.