Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
iztro-hook
Advanced tools
基于 iztro
实现的 react hook
。
用于获取紫微斗数星盘数据,运限数据(大小限,流年,流月,流日,流时等)。详细功能请查看 iztro开发文档
npm install iztro iztro-hook -S
export type IztroInput = {
birthday: string;
birthTime: number;
gender: GenderName;
birthdayType: 'lunar' | 'solar';
isLeapMonth?: boolean;
fixLeap?: boolean;
};
GenderName
的定义在 iztro 开发文档 -> GenderName 里。type useIztro = (input: IztroInput) => {
astrolabe: FunctionalAstrolabe | undefined;
horoscope: Horoscope | undefined;
setHoroscope: (date: string | Date, hour?: number) => void;
}
FunctionalAstrolabe
的定义在 iztro 开发文档 -> FunctionalAstrolabe 里。Horoscope
的定义在 iztro 开发文档 -> Horoscope 里。该 hook
只能在 react
组件中使用,如果你的项目不是使用 react
框架开发的,请使用 iztro
自行封装。
import React from 'react';
import { useIztro } from 'iztro-hook';
export default App() {
const { astrolabe, horoscope, setHoroscope } = useIztro({
birthday: '2000-18-16',
birthdayType: 'solar',
birthTime: 2,
gender: '女',
fixLeap: true,
});
return (
<>在此绑定数据进行渲染</>
);
}
如果你想了解更多关于紫微斗数的知识或者本开源库的信息,可以查看 iztro。如果好用记得给我一个⭐️鼓励哦~
FAQs
A hook of iztro。紫微斗数开源库iztro的react钩子函数。
The npm package iztro-hook receives a total of 8 weekly downloads. As such, iztro-hook popularity was classified as not popular.
We found that iztro-hook 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
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.