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.0.3 to 2.0.4

22

CHANGELOG.md

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

## v2.0.4
- 🛠️ 修复(fix)
🇨🇳
- 修复虚岁为0的问题
🇺🇸
- fix zero nominal age issue
- 🪄 功能(feature)
🇨🇳
- 增加独立的js库 #84
🇺🇸
- add independency js lib #84
## v2.0.3

@@ -12,0 +34,0 @@

2

lib/astro/FunctionalAstrolabe.js

@@ -43,3 +43,3 @@ "use strict";

// 虚岁
var nominalAge = _date.lunarYear - _birthday.lunarYear;
var nominalAge = Math.max(_date.lunarYear - _birthday.lunarYear, 1);
// 假如目标日期已经过了生日,则需要加1岁

@@ -46,0 +46,0 @@ // 比如 2022年九月初一 出生的人,在出生后虚岁为 1 岁

{
"name": "iztro",
"version": "2.0.3",
"version": "2.0.4",
"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",

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

"build": "tsc",
"rollup": "rollup -c --bundleConfigAsCjs",
"build:umd": "webpack",
"format": "prettier --write \"src/**/*.ts\"",

@@ -49,4 +51,8 @@ "lint": "eslint . --ext .ts",

"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.4.1",
"babel-loader": "^9.1.3",
"eslint": "^8.47.0",

@@ -59,4 +65,7 @@ "eslint-config-standard-with-typescript": "^38.0.0",

"prettier": "^3.0.0",
"terser-webpack-plugin": "^5.3.9",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},

@@ -63,0 +72,0 @@ "dependencies": {

@@ -64,5 +64,9 @@ <div align="center">

- 获取指定星耀对宫
- 获取指定运限宫位
- 获取指定运限宫位的三方四正
- 判断指定运限宫位内是否存在某些星耀
- 判断指定运限宫位内是否存在四化
- 判断指定运限三方四正内是否存在某些星耀
- 判断指定运限三方四正内是否存在四化
- 其他

@@ -118,2 +122,31 @@

### 独立js库
假如你使用的是静态 `html` 文件,可以下载 [release](https://github.com/SylarLong/iztro/releases) 资源文件中的 `iztro-min-js.tar.gz` 压缩包,里面包含了一个 `iztro` 压缩混淆过的`js`文件和对应的`sourcemap`文件。
> `v2.0.4+` 版本才提供独立js库。
将 `iztro-{version}.min.js` 用script标签引入html文件使用。
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>iztro-紫微斗数开源库</title>
</head>
<body>
<script src="./iztro-2.0.4.min.js"></script>
<script>
// 获取一张星盘数据
var astrolabe = iztro.asto.astrolabeBySolarDate('2000-8-16', 2, '男', true, 'zh-CN');
</script>
</body>
</html>
```
详细使用方法见 [iztro开发文档](https://docs.iztro.com/quick-start.html)
### 例子

@@ -120,0 +153,0 @@

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