Skip to content

Instantly share code, notes, and snippets.

@alizhdanov
Created October 27, 2018 16:31
Show Gist options
  • Save alizhdanov/10c4b96f9a109a096f5e3e176d90684f to your computer and use it in GitHub Desktop.
Save alizhdanov/10c4b96f9a109a096f5e3e176d90684f to your computer and use it in GitHub Desktop.
function parseValue(value) {
if (typeof value !== 'boolean') {
throw new TypeError(
`Boolean cannot represent a non boolean value: ${inspect(value)}`,
);
}
return value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment