sehoo 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.ts +4 -3
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
- import * as fs from "fs/promises";
1
+ import * as fs from "fs";
2
+ import path = require("path");
2
3
 
3
4
  const 절사 = (num: number) => {
4
5
  return Math.floor(num / 10) * 10;
@@ -52,8 +53,8 @@ const sehoo = async (option: Option) => {
52
53
  const 장기요양보험 = 절사(과세대상 * 장기요양보험_공제율);
53
54
  const 건강보험 = 절사(과세대상 * 건강보험_공제율);
54
55
  const 고용보험 = 절사(과세대상 * 고용보험_공제율);
55
- const 간이세액_기준 = await fs.readFile("./tax.csv", "utf-8")
56
- .then((data) => data.split("\n").map((line) => line.split("\t")))
56
+ const taxFilePath = path.join(__dirname, "tax.csv");
57
+ const 간이세액_기준 = fs.readFileSync(taxFilePath, "utf-8").split("\n").map((line) => line.split("\t");
57
58
  let 소득세 = 절사(Number(간이세액_기준.find(line => Number(line[0]) > 과세대상 / 1000)?.[공제대상가족_수]));
58
59
  if (!소득세) {
59
60
  const 기본_세액 = 1_507_400;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sehoo",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {