@boost/internal
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -6,2 +6,18 @@ # Change Log | ||
## 1.2.0 - 2020-04-29 | ||
#### 🚀 Updates | ||
- Add test utilities. (#77) ([f8d66ce](https://github.com/milesj/boost/commit/f8d66ce)), closes [#77](https://github.com/milesj/boost/issues/77) | ||
#### 🛠 Internals | ||
- Increase code coverage. ([b21824b](https://github.com/milesj/boost/commit/b21824b)) | ||
**Note:** Version bump only for package @boost/internal | ||
## 1.1.0 - 2020-02-04 | ||
@@ -8,0 +24,0 @@ |
import { Debugger } from 'debug'; | ||
export declare function sentenceCase(value: unknown): string; | ||
export default function createInternalDebugger(namespace: string): Debugger; | ||
//# sourceMappingURL=createInternalDebugger.d.ts.map |
@@ -7,7 +7,9 @@ "use strict"; | ||
const debug_1 = __importDefault(require("debug")); | ||
debug_1.default.formatters.S = function sentenceCase(value) { | ||
function sentenceCase(value) { | ||
return String(value) | ||
.replace(/[A-Z]/gu, match => ` ${match.toLocaleLowerCase()}`) | ||
.trim(); | ||
}; | ||
} | ||
exports.sentenceCase = sentenceCase; | ||
debug_1.default.formatters.S = sentenceCase; | ||
function createInternalDebugger(namespace) { | ||
@@ -14,0 +16,0 @@ return debug_1.default(`boost:${namespace}`); |
@@ -1,2 +0,2 @@ | ||
export default function env<T extends string = string>(key: string, value?: T): T | undefined; | ||
export default function env<T extends string = string>(key: string, value?: T | null): T | undefined; | ||
//# sourceMappingURL=env.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function env(key, value) { | ||
const name = `BOOSTJS_${key}`; | ||
if (value === null) { | ||
delete process.env[name]; | ||
return undefined; | ||
} | ||
if (typeof value === 'string') { | ||
process.env[`BOOSTJS_${key}`] = value; | ||
process.env[name] = value; | ||
return value; | ||
} | ||
// TODO: Remove fallback in v2 | ||
return (process.env[`BOOSTJS_${key}`] || process.env[`BOOST_${key}`]); | ||
return (process.env[name] || process.env[`BOOST_${key}`]); | ||
} | ||
exports.default = env; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// TODO: Remove in v2 | ||
class SignalError extends Error { | ||
@@ -4,0 +5,0 @@ constructor(message, signal) { |
{ | ||
"name": "@boost/internal", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Boost internals.", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "3c0a3aabc8de08093f34daaa4fbad3b42a7609db" | ||
"gitHead": "c77dc723462d054d8b7bbe927e99efd7e4f75084" | ||
} |
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
13534
176