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.5 to 2.0.6

12

CHANGELOG.md

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

## v2.0.6
- 🪄 功能(feature)
🇨🇳
- 新增空宫判断 #92
🇺🇸
- add empty palace verification #92
## v2.0.5

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

@@ -54,2 +54,15 @@ import { Palace } from '../data/types';

notHaveMutagen: (mutagen: Mutagen) => boolean;
/**
* 判断一个宫位是否为空宫(没有主星),
* 有些派别在宫位内有某些星耀的情况下,
* 是不会将该宫位判断为空宫的。
* 所以加入一个参数来传入星耀。
*
* @version v2.0.6
*
* @param excludeStars 星耀名称数组
*
* @returns {boolean} true | false
*/
isEmpty: (excludeStars?: StarName[]) => boolean;
}

@@ -82,2 +95,3 @@ /**

notHaveMutagen: (mutagen: Mutagen) => boolean;
isEmpty: (excludeStars?: StarName[]) => boolean;
}

@@ -17,2 +17,12 @@ "use strict";

this.notHaveMutagen = function (mutagen) { return (0, analyzer_1.notHaveMutagenInPalce)(_this, mutagen); };
this.isEmpty = function (excludeStars) {
var _a;
if ((_a = _this.majorStars) === null || _a === void 0 ? void 0 : _a.filter(function (star) { return star.type === 'major'; }).length) {
return false;
}
if ((excludeStars === null || excludeStars === void 0 ? void 0 : excludeStars.length) && _this.hasOneOf(excludeStars)) {
return false;
}
return true;
};
this.name = data.name;

@@ -19,0 +29,0 @@ this.isBodyPalace = data.isBodyPalace;

9

package.json
{
"name": "iztro",
"version": "2.0.5",
"version": "2.0.6",
"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",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"unpkg": "dist/iztro.min.js",
"jsdelivr": "dist/iztro.min.js",
"scripts": {

@@ -15,7 +17,6 @@ "build": "tsc",

"prepare": "yarn build",
"prepublishOnly": "npm test && yarn lint",
"prepublishOnly": "npm test && yarn lint && yarn build:umd",
"preversion": "yarn lint",
"version": "yarn format && git add -A src",
"postversion": "git push && git push --tags",
"pub": "yarn build:umd && yarn publish"
"postversion": "git push && git push --tags"
},

@@ -22,0 +23,0 @@ "files": [

@@ -77,3 +77,3 @@ <div align="center">

const astrolabe = astro.astrolabeBySolarDate('2000-8-16', 2, 'male', true, 'en-US');
const astrolabe = astro.bySolar('2000-8-16', 2, 'male', true, 'en-US');

@@ -80,0 +80,0 @@ astrolabe.star('emperor').surroundedPalaces().haveMutagen('focused');

@@ -78,3 +78,3 @@ <div align="center">

const astrolabe = astro.astrolabeBySolarDate('2000-8-16', 2, '男', true, 'zh-CN');
const astrolabe = astro.bySolar('2000-8-16', 2, '男', true, 'zh-CN');

@@ -81,0 +81,0 @@ astrolabe.star('紫微').surroundedPalaces().haveMutagen('忌');

@@ -70,2 +70,3 @@ <div align="center">

- 判断指定运限三方四正内是否存在四化
- 判断指定宫位是否是空宫

@@ -85,3 +86,3 @@ - 其他

const astrolabe = astro.astrolabeBySolarDate('2000-8-16', 2, '男', true, 'zh-CN');
const astrolabe = astro.bySolar('2000-8-16', 2, '男', true, 'zh-CN');

@@ -143,3 +144,3 @@ astrolabe.star('紫微').surroundedPalaces().haveMutagen('忌');

// 获取一张星盘数据
var astrolabe = iztro.asto.astrolabeBySolarDate('2000-8-16', 2, '男', true, 'zh-CN');
var astrolabe = iztro.asto.bySolar('2000-8-16', 2, '男', true, 'zh-CN');
</script>

@@ -151,4 +152,22 @@ </body>

详细使用方法见 [iztro开发文档](https://docs.iztro.com/quick-start.html)
当然,我们更推荐你直接使用 `CDN` 加速链接,你可以在下面列表中选择一个,在没有指定版本号的时候,会自动指向最新版本的代码库
- jsdelivr
- https://cdn.jsdelivr.net/npm/iztro/dist/iztro.min.js
- https://cdn.jsdelivr.net/npm/iztro@2.0.5/dist/iztro.min.js
- unpkg
- https://unpkg.com/iztro/dist/iztro.min.js
- https://unpkg.com/iztro@2.0.5/dist/iztro.min.js
你也可以使用如下规则来指定版本:
- `iztro@2`
- `iztro@^2.0.5`
- `iztro@2.0.5`
应为纯JS库没有代码提示和注释,所以在集成的时候请参阅 [iztro开发文档](https://docs.iztro.com/quick-start.html)
### 例子

@@ -155,0 +174,0 @@

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