npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@heyunmu/yunmu-feedback

v0.0.4

Published

[![Security Status](https://www.murphysec.com/platform3/v31/badge/1689826654463746048.svg)](https://www.murphysec.com/console/report/1689826654425997312/1689826654463746048)

Downloads

1

Readme

YunMuFeed

Security Status

模块 loading

参数

| 参数项 | 可选 | 默认值 | 注释 | | -------- | -------------- | -------------- | --------------------- | | message | string | 正在努力加载中 | 文字内容 | | mask | boolean | true | loading 背景 | | theme | normal pic | normal | 主题 | | pic | - | - | 主题为pic下图片链接 | | picWidth | string | 120px | 主题为pic下图片宽度 | | ref | - | - | 指向元素 |

使用

// 1. 默认使用
const loadingId = loading.show();
if (loadingId) {
  setTimeout(() => {
    loading.hide(loadingId);
  }, 2000);
}

// 2. 使用图片 (或许自行修改 图片样式)
const loadingId = loading.show({
  mask: false,
  theme: "pic",
  pic: "/loading.gif",
});
if (loadingId) {
  setTimeout(() => {
    loading.hide(loadingId);
  }, 2000);
}

模块 img

init 参数

| 参数项 | 可选 | 默认值 | 注释 | | ---------- | ------ | ------------------ | -------- | | maskColor | string | rgba(0, 0, 0, 0.3) | 背景颜色 | | zindex | string | 1000 | 层级 | | loadingPic | string | - | 加载图片 | | errorPic | string | - | 失败图片 | | select | string | .yun-img-select | 选择器 |

使用

// 仅显示一次
img.once({
  src: "https://cdn.pixabay.com/photo/2023/07/28/18/23/bird-8155768_1280.jpg",
});

// 全局初始化
img.init();

模块 alert

参数

| 参数项 | 可选 | 默认值 | 注释 | | ----------- | -------- | -------- | ---------------- | | title | string | 温馨提示 | 标题 | | message | *string | "" | 消息 | | icon | string | - | 类型图标 | | confirmShow | boolean | true | 是否显示确认按钮 | | confirmText | string | 确认 | 确认按钮文字 | | cancelShow | boolean | false | 是否显示取消按钮 | | cancelText | string | 取消 | 取消按钮文字 | | buttons | [] | [] | 自定义按钮 | | animate | string | bounce | 动画 css | | method | function | - | 回调方法 |

按钮组

| 参数项 | 可选 | 默认值 | 注释 | | ------ | ------ | ------ | ------------ | | name | string | "" | 按钮文字内容 | | class | string | - | 类名称 | | method | string | - | 方法名称 |

定义动画 css

@keyframes bounceIn {
  0%,
  20%,
  40%,
  60%,
  80%,
  to {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  0% {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }

  20% {
    transform: scale3d(1.1, 1.1, 1.1);
  }

  40% {
    transform: scale3d(0.9, 0.9, 0.9);
  }

  60% {
    opacity: 1;
    transform: scale3d(1.03, 1.03, 1.03);
  }

  80% {
    transform: scale3d(0.97, 0.97, 0.97);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.animate__bounceIn {
  animation-duration: 0.75s;
  animation-duration: calc(var(--animate-duration) * 0.75);
  animation-name: bounceIn;
}

@keyframes bounceOut {
  20% {
    transform: scale3d(0.9, 0.9, 0.9);
  }

  50%,
  55% {
    opacity: 1;
    transform: scale3d(1.1, 1.1, 1.1);
  }

  to {
    opacity: 0;
    transform: scale3d(0.3, 0.3, 0.3);
  }
}

.animate__bounceOut {
  animation-duration: 0.75s;
  animation-duration: calc(var(--animate-duration) * 0.75);
  animation-name: bounceOut;
}

使用

alert({
  icon: "success",
  buttons: [
    { name: "按钮1", method: "success", class: "primary" },
    { name: "按钮2", method: "failed", class: "success" },
  ],
  confirmShow: false,
  cancelShow: false,
  title: "提示",
  message:
    "Lorem, ipsum dolor sit amet consectetur adipisicing elit.Lorem, ipsum dolor sit amet consectetur adipisicing elit.Lorem, ipsum dolor sit amet consectetur adipisicing elit. ",
  method(_e, option, hide) {
    console.log(option);
    hide();
    return true;
  },
});