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

heigo

v1.1.0

Published

集成jquery所有的常用方法,封装bom相关的一系列函数 封装常用的移动端事件 集成前端开发过程中常用的插件 针对字符串,数组,对象进行了方法的扩展,在项目开发可以更加专注业务

Downloads

8

Readme

heigo

版本 @heigo 1.1.0.

介绍:

集成jquery所有的常用方法,封装bom相关的一系列函数 封装常用的移动端事件 集成前端开发过程中常用的插件 针对字符串,数组,对象进行了方法的扩展,在项目开发可以更加专注业务

作者:

陈元广

下载安装


    npm install -g heigo

安装

直接下载 / CDN 引用

https://unpkg.com/heigo

<script src="/path/to/heigo.js"></script>

NPM


npm install heigo --save

Yarn

yarn add heigo

使用

快速使用

提示: heigo框架未对ie浏览器做兼容,所以此框架更适合用于移动项目,不过,如果pc端项目不考虑ie浏览器,也是完全可以使用的

[安装] heigo 之后,让我们来简单的使用一下;


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        ul li {
            color: red;
            font-size: 20px
        }
    </style>
</head>

<body>
    <ul>
        <li>
            <p style="background: lightcoral">你好heigo</p>
        </li>
        <li>
            <p style="background: lightblue"></p>
        </li>
        <p></p>
        <li><button >切换</button></li>
    </ul>
    <script src="/heigo.js"></script>
    <script>
      //dom操作
      $("ul li").eq(1).html("在未来遇见你").css("color:red")
      //bom操作
      $.getFontSize(750) //设计图为750宽的移动端项目设置rem
      //移动端事件
      $("button").tap(()=>{
        console.log("点击事件")
      })
      //方法扩展
      var arr=[1,2,3,1,1,2,4]
      $.removeRepeatArray(arr)
      //数组去重[1,2,3,4]
    </script>
</body>

</html>

基于项目自动化使用

基于es6模块使用

import $ from 'heigo'
var arr=[1,2,3,1,1,2,4]
$.removeRepeatArray(arr)

基于common模块使用

var $=require("heigo")
var arr=[1,2,3,1,1,2,4]
$.removeRepeatArray(arr)