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

toolmanage

v3.0.3

Published

'smart基础工具类npm(beast)'

Downloads

8

Readme

toolmanage

smart基础组件npm包管理

项目结构

----npmmanage 
        --bin           //命令配置
        --src           //功能文件
        --test          //测试用例
        --.gitignore     //上传过滤配置
        --index.js      //主入口
        --LICENSE       //证书
        --package.json      //版本信息及其依赖
        --README.md     //md文档

项目应用

javaScript

#  引入至项目中
npm install toolmanage

#  项目中使用
import {collect,storage} from toolmanage

实例用法


# collect(收集==>监听生成日志)

import {collect} from toolmanage        //引入‘collect’

collect.monitor.server = 'http://192.168.1.145:5000' //调用该方法先传入server
collect.monitor.collect(app, device, content) //调用方法,并传入对应参数

# storage(local,session==>storage应用)

import {storage} from toolmanage        //引入‘storage’

storage.driver(str) //调用该方法入参str:local/session;决定localStorage/sessionStorage

storage.set(key,val) //同setItem
storage.get(key) //同getItem
storage.remove(key) //同removeItem
storage.clear()  //同clear

# validate
import {validate} from toolmanage //引入validate

var model={
    isUsed:true,
    telphone:'18782924967'
}
var validatorConfig={
    required:true,
    preCondition:function(model){
        return model.isUsed
    },
    description:'手机号码不能为空',
    regExp:'/^1[34578]\d{9}$/',
    regExpMsg:'手机号码格式不正确'
}//model是需要验证的对象,validatorConfig为验证配置

var result=validate(model,validatorConfig)  //model 验证对象,validatorConfig为配置的验证条件


{
 status:false,
 msg:rule.regExpMsg
}//result数据结构