Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

iztro

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iztro - npm Package Compare versions

Comparing version 2.4.2 to 2.4.3

12

CHANGELOG.md

@@ -10,2 +10,14 @@ # 紫微斗数

## v2.4.3
- 🛠️ 修复(fix)
🇨🇳
- 新增运限分界点参数以满足不同需求 #190
🇺🇸
- Wrong results using the parameter yearDivide to 'normal'. #190
## v2.4.2

@@ -12,0 +24,0 @@

3

lib/astro/astro.d.ts

@@ -30,3 +30,3 @@ import { Config, Language, Option, Plugin } from '../data/types';

*/
export declare const config: ({ mutagens, brightness, yearDivide }: Config) => void;
export declare const config: ({ mutagens, brightness, yearDivide, horoscopeDivide }: Config) => void;
export declare const getConfig: () => {

@@ -36,2 +36,3 @@ mutagens: Partial<Record<"jiaHeavenly" | "yiHeavenly" | "bingHeavenly" | "dingHeavenly" | "wuHeavenly" | "jiHeavenly" | "gengHeavenly" | "xinHeavenly" | "renHeavenly" | "guiHeavenly", ("lianzhenMaj" | "pojunMaj" | "wuquMaj" | "taiyangMaj" | "tianjiMaj" | "tianliangMaj" | "ziweiMaj" | "taiyinMaj" | "tiantongMaj" | "wenchangMin" | "jumenMaj" | "tanlangMaj" | "youbiMin" | "wenquMin" | "zuofuMin" | "huoxingMin" | "tianxiangMaj" | "lucunMin" | "si" | "bing" | "tianfuMaj" | "qishaMaj" | "tianmaMin" | "qingyangMin" | "tuoluoMin" | "lingxingMin" | "tiankuiMin" | "tianyueMin" | "dikongMin" | "dijieMin" | "tiankong" | "tianxing" | "tianyao" | "jieshen" | "yinsha" | "tianxi" | "tianguan" | "tianfu" | "tianku" | "tianxu" | "longchi" | "fengge" | "hongluan" | "guchen" | "guasu" | "feilian" | "posui" | "taifu" | "fenggao" | "tianwu" | "tianyue" | "santai" | "bazuo" | "engguang" | "tiangui" | "tiancai" | "tianshou" | "jiekong" | "xunzhong" | "xunkong" | "kongwang" | "jielu" | "yuede" | "tianshang" | "tianshi" | "tianchu" | "changsheng" | "muyu" | "guandai" | "linguan" | "diwang" | "shuai" | "mu" | "jue" | "tai" | "yang" | "boshi" | "lishi" | "qinglong" | "xiaohao" | "jiangjun" | "zhoushu" | "faylian" | "xishen" | "bingfu" | "dahao" | "fubing" | "guanfu" | "suijian" | "huiqi" | "sangmen" | "guansuo" | "gwanfu" | "longde" | "baihu" | "tiande" | "diaoke" | "jiangxing" | "panan" | "suiyi" | "xiishen" | "huagai" | "jiesha" | "zhaisha" | "tiansha" | "zhibei" | "xianchi" | "yuesha" | "wangshen" | "yunkui" | "yunyue" | "yunchang" | "yunqu" | "yunluan" | "yunxi" | "yunlu" | "yunyang" | "yuntuo" | "yunma" | "liukui" | "liuyue" | "liuchang" | "liuqu" | "liuluan" | "liuxi" | "liulu" | "liuyang" | "liutuo" | "liuma" | "nianjie")[]>>;

yearDivide: "exact" | "normal";
horoscopeDivide: "exact" | "normal";
};

@@ -38,0 +39,0 @@ /**

@@ -27,2 +27,3 @@ "use strict";

var _yearDivide = 'exact';
var _horoscopeDivide = 'exact';
/**

@@ -61,3 +62,3 @@ * 批量加载插件

var config = function (_a) {
var mutagens = _a.mutagens, brightness = _a.brightness, yearDivide = _a.yearDivide;
var mutagens = _a.mutagens, brightness = _a.brightness, yearDivide = _a.yearDivide, horoscopeDivide = _a.horoscopeDivide;
if (mutagens) {

@@ -80,2 +81,5 @@ Object.entries(mutagens).forEach(function (_a) {

}
if (horoscopeDivide) {
_horoscopeDivide = horoscopeDivide;
}
};

@@ -87,2 +91,3 @@ exports.config = config;

yearDivide: _yearDivide,
horoscopeDivide: _horoscopeDivide,
}); };

@@ -89,0 +94,0 @@ exports.getConfig = getConfig;

@@ -24,2 +24,3 @@ "use strict";

var FunctionalHoroscope_1 = __importDefault(require("./FunctionalHoroscope"));
var astro_1 = require("./astro");
/**

@@ -43,4 +44,4 @@ * 获取运限数据

var _a = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(targetDate, timeIndex || convertTimeIndex, {
// 运限是以立春为界
year: 'exact',
// 运限是以立春为界,但为了满足部分流派允许配置
year: (0, astro_1.getConfig)().horoscopeDivide,
}), yearly = _a.yearly, monthly = _a.monthly, daily = _a.daily, hourly = _a.hourly;

@@ -47,0 +48,0 @@ // 虚岁

@@ -167,2 +167,3 @@ import { IFunctionalPalace } from '../../astro/FunctionalPalace';

yearDivide?: 'normal' | 'exact';
horoscopeDivide?: 'normal' | 'exact';
};

@@ -169,0 +170,0 @@ export type Option = {

@@ -191,4 +191,4 @@ "use strict";

var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDateStr, 0, {
// 流年神煞应该用立春为界
year: 'exact',
// 流年神煞应该用立春为界,但为了满足不同流派的需求允许配置
year: (0, astro_1.getConfig)().horoscopeDivide,
}).yearly;

@@ -195,0 +195,0 @@ var ts12shen = [

@@ -529,4 +529,4 @@ "use strict";

var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDate, timeIndex, {
// 流耀应该用立春为界
year: 'exact',
// 流耀应该用立春为界,但为了满足不同流派的需求允许配置
year: (0, astro_1.getConfig)().horoscopeDivide,
}).yearly;

@@ -533,0 +533,0 @@ var _a = (0, astro_1.getSoulAndBody)(solarDate, timeIndex, fixLeap), soulIndex = _a.soulIndex, bodyIndex = _a.bodyIndex;

{
"name": "iztro",
"version": "2.4.2",
"version": "2.4.3",
"description": "轻量级紫微斗数星盘生成库。可以通过出生年月日获取到紫微斗数星盘信息、生肖、星座等信息。A lightweight kit to astrolabe generator of The Purple Star Astrology (Zi Wei Dou Shu). The Purple Star Astrology(Zi Wei Dou Shu) is a Chinese ancient astrology. You're able to get your horoscope and personality from the astrolabe",

@@ -74,4 +74,4 @@ "main": "lib/index.js",

"i18next": "^23.5.1",
"lunar-lite": "^0.2.0"
"lunar-lite": "^0.2.3"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc