
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
Korean Saju (Four Pillars) and Manseryeok calculation library
νκ΅ μ¬μ£Όλͺ 리νμ λ§μΈλ ₯μ κ³μ°νλ TypeScript λΌμ΄λΈλ¬λ¦¬μ λλ€.
μλ ₯/μλ ₯ λ μ§λ₯Ό μ λ ₯νλ©΄ μ νν μ¬μ£Όνμ(λ μ£Ό, μμ£Ό, μΌμ£Ό, μμ£Ό)λ₯Ό κ³μ°ν΄μ€λλ€.
npm install manseryeok
# or
yarn add manseryeok
# or
pnpm add manseryeok
import { calculateFourPillars, fourPillarsToString } from 'manseryeok';
// μλ ₯ λ μ§λ‘ μ¬μ£Ό κ³μ°
const result = calculateFourPillars({
year: 1992, // μ°λ (μλ ₯)
month: 10, // μ (μλ ₯, 1-12)
day: 24, // μΌ (μλ ₯, 1-31)
hour: 5, // μ (24μκ°μ , 0-23)
minute: 30 // λΆ (0-59)
});
console.log(fourPillarsToString(result));
// μΆλ ₯: μμ μ°μ£Ό, κ²½μ μμ£Ό, κ³μ μΌμ£Ό, μλ¬μμ£Ό
// λ€μν μΆλ ₯ νμ
console.log(result.toString());
// μΆλ ₯: μμ λ
μ£Ό, κ²½μ μμ£Ό, κ³μ μΌμ£Ό, μλ¬μμ£Ό
console.log(result.toObject());
// μΆλ ₯: { year: 'μμ ', month: 'κ²½μ ', day: 'κ³μ ', hour: 'μλ¬' }
console.log(result.toHanjaString());
// μΆλ ₯: 壬η³εΉ΄ζ±, εΊζζζ±, ηΈι
ζ₯ζ±, δΉε―ζζ±
console.log(result.toHanjaObject());
// μΆλ ₯: {
// year: { korean: 'μμ ', hanja: '壬η³' },
// month: { korean: 'κ²½μ ', hanja: 'εΊζ' },
// day: { korean: 'κ³μ ', hanja: 'ηΈι
' },
// hour: { korean: 'μλ¬', hanja: 'δΉε―' }
// }
// μμμ€ν μ 보
console.log(result.dayElement);
// μΆλ ₯: { stem: 'μ', branch: 'κΈ' }
// stemμ μ²κ°(κ³)μ μ€ν, branchλ μ§μ§(μ )μ μ€ν
console.log(result.dayYinYang);
// μΆλ ₯: { stem: 'μ', branch: 'μ' }
// stemμ μ²κ°(κ³)μ μμ, branchλ μ§μ§(μ )μ μμ
// μλ ₯ λ μ§λ‘ μ¬μ£Ό κ³μ°
const result = calculateFourPillars({
year: 1992, // μ°λ (μλ ₯)
month: 9, // μ (μλ ₯, 1-12)
day: 29, // μΌ (μλ ₯, 1-30)
hour: 5, // μ (24μκ°μ , 0-23)
minute: 30, // λΆ (0-59)
isLunar: true, // μλ ₯ μ¬μ© μ¬λΆ (νμ)
isLeapMonth: false // μ€λ¬ μ¬λΆ (μλ ₯ μ¬μ©μμλ§ νμ)
});
// μ μλ ₯ 1992λ
9μ 29μΌμ μλ ₯ 1992λ
10μ 24μΌκ³Ό λμΌ
| νλΌλ―Έν° | νμ | μ€λͺ | λ²μ/μμ |
|---|---|---|---|
year | number | μ°λ | 1900-2100 |
month | number | μ | 1-12 |
day | number | μΌ | 1-31 (μλ ₯), 1-30 (μλ ₯) |
hour | number | μ (24μκ°μ ) | 0-23 (0μ = μμ , 13μ = μ€ν 1μ) |
minute | number | λΆ | 0-59 |
isLunar | boolean? | μλ ₯ μ¬μ© μ¬λΆ | true/false (κΈ°λ³Έκ°: false) |
isLeapMonth | boolean? | μ€λ¬ μ¬λΆ | true/false (μλ ₯μΌ λλ§ μ¬μ©) |
// μλ²½ 3μ 15λΆ
const time1 = { hour: 3, minute: 15 };
// μ€μ 9μ μ κ°
const time2 = { hour: 9, minute: 0 };
// μ€ν 2μ 30λΆ
const time3 = { hour: 14, minute: 30 };
// λ°€ 11μ 45λΆ
const time4 = { hour: 23, minute: 45 };
μλ ₯κ³Ό μλ ₯μ μλ‘ λ³νν μ μμ΅λλ€:
import { solarToLunar, lunarToSolar } from 'manseryeok';
// μλ ₯ β μλ ₯ λ³ν
const lunar = solarToLunar(2024, 1, 1);
console.log(lunar);
// { year: 2023, month: 11, day: 20, isLeapMonth: false }
// 2024λ
1μ 1μΌμ μλ ₯μΌλ‘ 2023λ
11μ 20μΌ
// μλ ₯ β μλ ₯ λ³ν
const solar = lunarToSolar(2023, 11, 20, false);
console.log(solar);
// { year: 2024, month: 1, day: 1 }
// μλ ₯ 2023λ
11μ 20μΌμ μλ ₯μΌλ‘ 2024λ
1μ 1μΌ
// μ€λ¬ μ²λ¦¬ μμ
const leapMonthSolar = lunarToSolar(2020, 4, 1, true); // 2020λ
μ€4μ 1μΌ
console.log(leapMonthSolar);
// { year: 2020, month: 5, day: 23 }
import {
getHeavenlyStemYinYang,
getHeavenlyStemElement,
getEarthlyBranchElement
} from 'manseryeok';
// μ²κ°μ μμ νμΈ
console.log(getHeavenlyStemYinYang('κ°')); // 'μ'
// μ²κ°μ μ€ν νμΈ
console.log(getHeavenlyStemElement('κ°')); // 'λͺ©'
// μ§μ§μ μ€ν νμΈ
console.log(getEarthlyBranchElement('μ')); // 'μ'
interface BirthInfo {
year: number;
month: number;
day: number;
hour: number;
minute: number;
isLunar?: boolean; // trueλ©΄ μλ ₯, false/undefinedλ©΄ μλ ₯
isLeapMonth?: boolean; // μλ ₯ μ€λ¬ μ¬λΆ
}
interface Pillar {
heavenlyStem: HeavenlyStem; // μ²κ°
earthlyBranch: EarthlyBranch; // μ§μ§
}
interface FourPillars {
year: Pillar; // μ°μ£Ό
month: Pillar; // μμ£Ό
day: Pillar; // μΌμ£Ό
hour: Pillar; // μμ£Ό
}
calculateFourPillars(birthInfo: BirthInfo): FourPillars - μ¬μ£Ό κ³μ°fourPillarsToString(fourPillars: FourPillars): string - μ¬μ£Όλ₯Ό νκ΅μ΄ λ¬Έμμ΄λ‘ λ³νsolarToLunar(year, month, day): LunarDate - μλ ₯μ μλ ₯μΌλ‘ λ³νlunarToSolar(year, month, day, isLeapMonth): SolarDate - μλ ₯μ μλ ₯μΌλ‘ λ³νgetHeavenlyStemYinYang(stem: HeavenlyStem): YinYang - μ²κ°μ μμgetHeavenlyStemElement(stem: HeavenlyStem): FiveElement - μ²κ°μ μ€νgetEarthlyBranchElement(branch: EarthlyBranch): FiveElement - μ§μ§μ μ€νμμ£Ό κ³μ°μ λ€μμ 12μμ§ μ²΄κ³λ₯Ό λ°λ¦ λλ€:
| μμ§ | μκ°λ | 24μκ°μ μ λ ₯ μμ |
|---|---|---|
| μμ(εζ) | 23:00-01:00 | hour: 23 λλ hour: 0 |
| μΆμ(δΈζ) | 01:00-03:00 | hour: 1 λλ hour: 2 |
| μΈμ(ε― ζ) | 03:00-05:00 | hour: 3 λλ hour: 4 |
| λ¬μ(ε―ζ) | 05:00-07:00 | hour: 5 λλ hour: 6 |
| μ§μ(θΎ°ζ) | 07:00-09:00 | hour: 7 λλ hour: 8 |
| μ¬μ(ε·³ζ) | 09:00-11:00 | hour: 9 λλ hour: 10 |
| μ€μ(εζ) | 11:00-13:00 | hour: 11 λλ hour: 12 |
| λ―Έμ(ζͺζ) | 13:00-15:00 | hour: 13 λλ hour: 14 |
| μ μ(η³ζ) | 15:00-17:00 | hour: 15 λλ hour: 16 |
| μ μ(ι ζ) | 17:00-19:00 | hour: 17 λλ hour: 18 |
| μ μ(ζζ) | 19:00-21:00 | hour: 19 λλ hour: 20 |
| ν΄μ(δΊ₯ζ) | 21:00-23:00 | hour: 21 λλ hour: 22 |
λΆ(minute) λ¨μκΉμ§ κ³ λ €νμ¬ λ μ νν μμ£Όλ₯Ό κ³μ°ν©λλ€:
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build
pnpm build
# Lint
pnpm lint
# Format
pnpm format
MIT Β© Yoohyojun
Contributions are welcome! Please feel free to submit a Pull Request.
// 1. μλ ₯μΌλ‘ μ
λ ₯
const saju1 = calculateFourPillars({
year: 1990,
month: 5,
day: 15,
hour: 14, // μ€ν 2μ
minute: 30
});
// 2. μλ ₯μΌλ‘ μ
λ ₯ (μλ ₯ 1990λ
4μ 21μΌ)
const saju2 = calculateFourPillars({
year: 1990,
month: 4,
day: 21,
hour: 14,
minute: 30,
isLunar: true,
isLeapMonth: false
});
// 3. μμ μΆμ
const saju3 = calculateFourPillars({
year: 2000,
month: 1,
day: 1,
hour: 0, // μμ (0μ)
minute: 0
});
// 4. λ°€ 11μ μΆμ (μμ)
const saju4 = calculateFourPillars({
year: 2000,
month: 1,
day: 1,
hour: 23, // λ°€ 11μ (μμ)
minute: 30
});
FAQs
Korean Saju (Four Pillars) and Manseryeok calculation library
The npm package manseryeok receives a total of 2,260 weekly downloads. As such, manseryeok popularity was classified as popular.
We found that manseryeok demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.