@markuplint/types
Advanced tools
Comparing version 1.0.0-dev.20211213.3 to 1.0.0-dev.20220106.0
@@ -73,4 +73,6 @@ "use strict"; | ||
const _w = console.warn; | ||
// eslint-disable-next-line no-console | ||
console.warn = warn => (0, debug_1.log)('WARNING: %s (by %s => %s)', warn, value, type); | ||
if (debug_1.log.enabled) { | ||
// eslint-disable-next-line no-console | ||
console.warn = warn => (0, debug_1.log)('WARNING: %s (by %s => %s)', warn, value, type); | ||
} | ||
const tokens = (0, prepare_tokens_js_1.default)(value, lexer.syntax); | ||
@@ -96,3 +98,5 @@ const result = (0, match_js_1.matchAsTree)(tokens, matcher.match, lexer); | ||
if (result.match) { | ||
(0, debug_1.log)('css-tree/result.match: %s', JSON.stringify(result.match, null, 2)); | ||
if (debug_1.log.enabled) { | ||
(0, debug_1.log)('css-tree/result.match: %s', JSON.stringify(result.match, null, 2)); | ||
} | ||
return (0, match_result_1.matched)(); | ||
@@ -99,0 +103,0 @@ } |
@@ -23,8 +23,10 @@ "use strict"; | ||
resultCache.set(key, result); | ||
(0, debug_1.log)('Cache checking: %O', { | ||
input: value, | ||
type, | ||
key, | ||
result: result, | ||
}); | ||
if (debug_1.log.enabled) { | ||
(0, debug_1.log)('Cache checking: %O', { | ||
input: value, | ||
type, | ||
key, | ||
result: result, | ||
}); | ||
} | ||
} | ||
@@ -31,0 +33,0 @@ return result; |
{ | ||
"name": "@markuplint/types", | ||
"version": "1.0.0-dev.20211213.3", | ||
"version": "1.0.0-dev.20220106.0", | ||
"description": "Types of attributes and properties and more", | ||
@@ -32,3 +32,3 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
}, | ||
"gitHead": "73fab2765c080b0a42e71bdc1eed09bae0ed360e" | ||
"gitHead": "ae095a6ca5d8ee8590fe21310c097b47d6d79486" | ||
} |
@@ -99,5 +99,8 @@ import type { CustomCssSyntax, CssSyntaxTokenizer, CSSSyntaxToken, GetNextToken, Result, CssSyntax } from './types'; | ||
const _w = console.warn; | ||
// eslint-disable-next-line no-console | ||
console.warn = warn => log('WARNING: %s (by %s => %s)', warn, value, type); | ||
if (log.enabled) { | ||
// eslint-disable-next-line no-console | ||
console.warn = warn => log('WARNING: %s (by %s => %s)', warn, value, type); | ||
} | ||
const tokens = prepareTokens(value, lexer.syntax); | ||
@@ -126,3 +129,5 @@ const result = matchAsTree(tokens, matcher.match, lexer); | ||
if (result.match) { | ||
log('css-tree/result.match: %s', JSON.stringify(result.match, null, 2)); | ||
if (log.enabled) { | ||
log('css-tree/result.match: %s', JSON.stringify(result.match, null, 2)); | ||
} | ||
return matched(); | ||
@@ -129,0 +134,0 @@ } |
@@ -26,8 +26,10 @@ import type { Result } from './types'; | ||
resultCache.set(key, result); | ||
log('Cache checking: %O', { | ||
input: value, | ||
type, | ||
key, | ||
result: result, | ||
}); | ||
if (log.enabled) { | ||
log('Cache checking: %O', { | ||
input: value, | ||
type, | ||
key, | ||
result: result, | ||
}); | ||
} | ||
} | ||
@@ -34,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
533289
13610