@gulujs/toml
Version:
TOML parser and serializer
11 lines (10 loc) • 339 B
JavaScript
import { TYPE_ERROR_MESSAGE } from '../../errors/index.js';
export function assertIsBoolean(value, _options, path) {
if (typeof value === 'boolean') {
return;
}
throw new TypeError(TYPE_ERROR_MESSAGE(path, 'is not a boolean'));
}
export function serializeBoolean(value, _schema, _options) {
return String(value);
}