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

animal-say

v0.8.2

Published

a tip tool with animal for brower, include tosat, alert, confirm, loading, progress.

Downloads

11

Readme

What's this? / 这啥玩意啊?

  • This is an interesting tiptool for web page. 这是一个有丶意思的网页提示工具。
  • It has many Custom options. 它拥有许多自定义选项。
  • it has fashioned UI for default option. 默认选项拥有着时尚的UI。
  • It don't need to dependent on any JavaScript framework. It mean you can use it with any web page project. 它不依赖任何框架,这意味着你可以在任web page项目中使用它。

How to install / 如何安装

  • if you use npm / 使用 npm 安装
$ npm i animal-say
  • if you use yarn / 使用 yarn 安装
$ yarn add animal-say
  • if you use script with cdn / 使用 cdn 引入
<script src="https://unpkg.com/animal-say/dist/index.js"></script>

<!-- 推荐使用 @x.x.x 来锁定版本号,避免更新时不同版本带来的兼容性问题,示例 -->
<script src="https://unpkg.com/[email protected]/dist/index.js"></script>
<script src="path_to_animal-say/index.js"></script>

get Started / 开始使用

  • use es 6 module
import Animal from 'animal-say'

// 使用默认选项
// use the default configure
Animal.say('hello world')

// 当然,你也可以修改默认选项,像这样
// also you can edit the configure, like this
Animal.conf.animal.animation = 'slide'
// ...

// 或者使用新的独立配置,继承于默认配置
// or use a new configure, extends from default configure
const animal = new Animal({
  animal: {
    animation: 'slide'
  }
  // ... some other Configures options here
})

// message
animal.say('hello word')

// dialog
animal.tell('I am here')
  .then(() => console.log('click!'))

// confirm dialog
animal.confirm('Are you OK ?')
  .then(() => console.log('choose yes'))
  .catch(() => console.log('choose no'))

// confirm dialog with a input
animal.ask('What your favorite moive ?')
  .then(({answer}) => console.log('your answer is ' + answer))
  .catch(({answer}) => console.log('you reject to answer.'))

// call loading
animal.loading('')
// close loading
animal.quiet('loading')

// call progress (0~100)
animal.progress(15)
// auto close when progress is 100
animal.progress(100)
// close progress
animal.quiet('progress')

wiki

在wiki上查看更多 / see more about it on wiki

查看演示 / see demonstration

The End

  • If you like my work, give me a start to support my project.
  • 如果你喜欢我的项目,不妨给个star来支持一下。