Skip to content

Commit 4f9a166

Browse files
authored
added function bool2hanzi
1 parent ca2681b commit 4f9a166

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/hanzi2num.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,13 @@ function num2hanzi(n, format = "", precision = undefined) {
849849
return str;
850850
}
851851

852+
function bool2hanzi(b) {
853+
if (b) {
854+
return "陽";
855+
}
856+
return "陰";
857+
}
858+
852859
try {
853-
module.exports = { hanzi2num, hanzi2numstr, num2hanzi };
860+
module.exports = { hanzi2num, hanzi2numstr, num2hanzi, bool2hanzi };
854861
} catch (e) {}

0 commit comments

Comments
 (0)