Comparing version 1.13.6 to 1.14.2
@@ -12,3 +12,3 @@ /*! | ||
import { VERSION } from './config.js'; | ||
import type { Loggable } from './loggable.js'; | ||
import type { Loggable } from './logger.js'; | ||
declare type LogLevelTitle = 'ERR' | 'WARN' | 'INFO' | 'VERB' | 'SILL'; | ||
@@ -15,0 +15,0 @@ declare type TextPrinterFunction = (title: string, text?: string) => void; |
@@ -303,6 +303,12 @@ "use strict"; | ||
case '%d': | ||
val = parseFloat(val); | ||
if (isNaN(val)) { | ||
val = 0; | ||
} | ||
val = Number(val); | ||
/** | ||
* Huan(202111): use Number() to replace parseFloat, | ||
* and keep the `NaN` as a result for easy debugging | ||
* when we use `%d` mistakenly when `%s` should be expected. | ||
*/ | ||
// val = parseFloat(val) | ||
// if (isNaN(val)) { | ||
// val = 0 | ||
// } | ||
break; | ||
@@ -309,0 +315,0 @@ } |
import { VERSION } from './config.js'; | ||
import { Brolog, log } from './brolog.js'; | ||
import type { Loggable } from './loggable.js'; | ||
import { getLoggable } from './loggable.js'; | ||
export type { Loggable, }; | ||
export { VERSION, Brolog, getLoggable, log, }; | ||
import type { Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger } from './logger.js'; | ||
import { getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger } from './logger.js'; | ||
export type { Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger, }; | ||
export { VERSION, Brolog, getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, log, }; | ||
//# sourceMappingURL=mod.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.log = exports.getLoggable = exports.Brolog = exports.VERSION = void 0; | ||
exports.log = exports.getLogger = exports.getLoggable = exports.Brolog = exports.VERSION = void 0; | ||
const config_js_1 = require("./config.js"); | ||
@@ -9,4 +9,5 @@ Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return config_js_1.VERSION; } }); | ||
Object.defineProperty(exports, "log", { enumerable: true, get: function () { return brolog_js_1.log; } }); | ||
const loggable_js_1 = require("./loggable.js"); | ||
Object.defineProperty(exports, "getLoggable", { enumerable: true, get: function () { return loggable_js_1.getLoggable; } }); | ||
const logger_js_1 = require("./logger.js"); | ||
Object.defineProperty(exports, "getLoggable", { enumerable: true, get: function () { return logger_js_1.getLoggable; } }); | ||
Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return logger_js_1.getLogger; } }); | ||
//# sourceMappingURL=mod.js.map |
@@ -12,3 +12,3 @@ /*! | ||
import { VERSION } from './config.js'; | ||
import type { Loggable } from './loggable.js'; | ||
import type { Loggable } from './logger.js'; | ||
declare type LogLevelTitle = 'ERR' | 'WARN' | 'INFO' | 'VERB' | 'SILL'; | ||
@@ -15,0 +15,0 @@ declare type TextPrinterFunction = (title: string, text?: string) => void; |
@@ -297,6 +297,12 @@ /* eslint-disable no-console */ | ||
case '%d': | ||
val = parseFloat(val); | ||
if (isNaN(val)) { | ||
val = 0; | ||
} | ||
val = Number(val); | ||
/** | ||
* Huan(202111): use Number() to replace parseFloat, | ||
* and keep the `NaN` as a result for easy debugging | ||
* when we use `%d` mistakenly when `%s` should be expected. | ||
*/ | ||
// val = parseFloat(val) | ||
// if (isNaN(val)) { | ||
// val = 0 | ||
// } | ||
break; | ||
@@ -303,0 +309,0 @@ } |
import { VERSION } from './config.js'; | ||
import { Brolog, log } from './brolog.js'; | ||
import type { Loggable } from './loggable.js'; | ||
import { getLoggable } from './loggable.js'; | ||
export type { Loggable, }; | ||
export { VERSION, Brolog, getLoggable, log, }; | ||
import type { Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger } from './logger.js'; | ||
import { getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger } from './logger.js'; | ||
export type { Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger, }; | ||
export { VERSION, Brolog, getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, log, }; | ||
//# sourceMappingURL=mod.d.ts.map |
import { VERSION, } from './config.js'; | ||
import { Brolog, log, } from './brolog.js'; | ||
import { getLoggable, } from './loggable.js'; | ||
export { VERSION, Brolog, getLoggable, log, }; | ||
import { getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, } from './logger.js'; | ||
export { VERSION, Brolog, getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, log, }; | ||
//# sourceMappingURL=mod.js.map |
{ | ||
"name": "brolog", | ||
"version": "1.13.6", | ||
"version": "1.14.2", | ||
"description": "Npmlog like logger for Browser", | ||
@@ -77,6 +77,2 @@ "type": "module", | ||
], | ||
"publishConfig": { | ||
"access": "public", | ||
"tag": "next" | ||
}, | ||
"git": { | ||
@@ -83,0 +79,0 @@ "scripts": { |
@@ -20,3 +20,3 @@ /* eslint-disable no-console */ | ||
Loggable, | ||
} from './loggable.js' | ||
} from './logger.js' | ||
@@ -369,6 +369,12 @@ type LogLevelTitle = | ||
case '%d': | ||
val = parseFloat(val) | ||
if (isNaN(val)) { | ||
val = 0 | ||
} | ||
val = Number(val) | ||
/** | ||
* Huan(202111): use Number() to replace parseFloat, | ||
* and keep the `NaN` as a result for easy debugging | ||
* when we use `%d` mistakenly when `%s` should be expected. | ||
*/ | ||
// val = parseFloat(val) | ||
// if (isNaN(val)) { | ||
// val = 0 | ||
// } | ||
break | ||
@@ -375,0 +381,0 @@ } |
@@ -9,10 +9,13 @@ import { | ||
import type { | ||
Loggable, | ||
} from './loggable.js' | ||
Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger, | ||
} from './logger.js' | ||
import { | ||
getLoggable, | ||
} from './loggable.js' | ||
getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, | ||
} from './logger.js' | ||
export type { | ||
Loggable, | ||
Loggable, // @deprecated: use Logger instead. will be removed after Dec 31, 2022 | ||
Logger, | ||
} | ||
@@ -22,4 +25,5 @@ export { | ||
Brolog, | ||
getLoggable, | ||
getLoggable, // @deprecated: use getLogger instead. will be removed after Dec 31, 2022 | ||
getLogger, | ||
log, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
176172
2508