2.0.3 • Published 1 year ago

@cli-dang/boolean v2.0.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@cli-dang/boolean


Module collection of logical boolean functions.

Index of Contents


Description


@cli-dang/boolean


Installation


npm install @cli-dang/boolean

@cli-dang/boolean API


.map(logic, against)

import { map } from '@cli-dang/boolean'

await map({yes: true, no: false}, 'no').catch(error=>console.error(error))
// resolves with false

.true_false(string)

import { true_false } from '@cli-dang/boolean'

await true_false('true').catch(error=>console.error(error))
// resolves with true

await true_false('false').catch(error=>console.error(error))
// resolves with false

await true_false('truth').catch(error=>console.error(error))
// rejects and prints '♠ parameter `string` accept only the strings "true" or "false". given: truth'

JetBrains OSS License


I want to thank JetBrains to grant me the Open Source Software license for all their products. This opportunity gives me strength to keep on going with my studies and personal project.
To learn more about this opportunity, have a look at Licenses for Open Source Development - Community Support.

Thank you