repo.or.cz
/
ProtonMail-WebClient.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git]
/
packages
/
shared
/
lib
/
helpers
/
boolean.ts
blob
efec74c1df5aaf7388c9403f035f49eccabef8f3
1
/**
2
* This function is the same as (bool) => +bool,
3
* but the return type is 0 | 1 instead of number
4
*/
5
export const booleanToNumber = (bool: boolean): 0 | 1 => {
6
return bool ? 1 : 0;
7
};