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

mykits

v1.0.14

Published

my-kit

Downloads

9

Readme

mykits

安装

npm i mykits

说明:mykits 包中 全部按需导出

kit.js

import {RsaUtils} from "./js/rsaUtils";

// 按需导出
export {RsaUtils}
export {RsaUtils, rsaUtils, randomAny}

randomAny 模块

引入

import {randomAny} from 'mykits'

randomAny

说明:randomAny中的设置

// 默认随机集合设置
const randomMapOption = {
    // 数字
    numbers: '1234567890',
    // 字母
    letters: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
    // 英文符号
    specials: '<~!@#$%^*()_+-=[]{}|;:,./?>',
}

使用

// 默认
randomAny(4)  // 随机出4个 randomMapOption 中的字符  
// 自定义随机字符
const ourString='asdf12#$%asfas'
randomAny(4, ourString)  // 随机出4个 ourString 中的字符  
// 按需字符
// 不需要什么就将什么设置为false
const option={
    number:'123',       // 从123中随机 
    letters:'',         // 要字母
    specials:false,     // 英文符号
    
}
randomAny(4, option)  // 随机出4个 option 中的字符  

TripNx 模块

引入

import {TripNx} from 'mykits'

使用

// 
let options1 = {
    envConfig:{
        log:true
    },
    httpConfig: {
        url: "/open-api/service",
        baseURL: '',
        timeout: 5000
    },
    encryptConfig: {
        appId: "YKTHYXCX",
        publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDvfc+/jtMtjRu9GN3GzDs20i8wNDx+45G0esxsvEQJFK3HPjh1FMYEVf+nalYuseoUYPFiLSaHoIgb244G3uIPPyAJ2zimRbZuKYLBHYcMf5/G1h1CjQXr5g3klETkl4qtIn8QCuPmRJGN48Ir5M3z6bb0a8pKV61wHzw1DrQXZQIDAQAB',
        privateKey: 'MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAO99z7+O0y2NG70Y3cbMOzbSLzA0PH7jkbR6zGy8RAkUrcc+OHUUxgRV/6dqVi6x6hRg8WItJoegiBvbjgbe4g8/IAnbOKZFtm4pgsEdhwx/n8bWHUKNBevmDeSUROSXiq0ifxAK4+ZEkY3jwivkzfPptvRrykpXrXAfPDUOtBdlAgMBAAECgYAI2YuSfs7fbUoz3eYeGUBr6W7sd1Wv861X77y7nOZftoeoZ+xyqSKbGOlyUIvgPFtTxvRMhjIZC23UJ7QTHWvZhZQ0dmTGzA2F034sjWtZb1E3f1xzC6azUKxIFIEj6pMry5pXbMfyLxjJSaoz9JDFZHHFUsYm1BI1cXGBgugYYQJBAPyqJwxhH/zQFgBr7qhpL7A1hIX9zU1fymQ5OwZhaRsa8NZXiL2AD1YwJt1okDDQdoDtdNmHdlTLHJ3OIqf9SEUCQQDypyRPfZKeLEHNLOkRvASlEA5m2xnMzAEsdfJvw8c0H1uZEcapZYjcXDwjgAwLBHHWftb2FECuwzGH1Kq8l1ShAkEA2gBtxK6gjN91vFNkDgcD0IO8nmfIFfSKikMe/Hhb2bk7B5VrNCYkFXdicTLhBl03gjJf2biZjrvZKwdKu6s8CQJABfjhJuezTRtPv0oEroAPKTTc9eEcoHLA8KQyhFewNnMzIPBUEGVEWhAXFtSW90pzttDGX6Yd9W8ub+ZnEV80IQJAPSJjP50d+5oTwebK8D0LR18qIZDycdz8HlRNW8A925UMx1yC+ijDmyNob4vNiO4tUEU61XJUsVr9xkr93AcBNw==',
        // encryptType: 'tripnxRsa',
        encryptType: 'tripnxRsa'
    },
}
// 实例 TripNx

let tripnx1 = new TripNx(options)

let options2 = {
    envConfig:{
        log:true
    },
    httpConfig: {
        url: "",
        baseURL: '',
        timeout: 10 * 1000
    },
    encryptConfig: {
        appId: "应用id",
        publicKey: '公钥',
        privateKey: '私钥',
        encryptType: 'maplexRsa'
    },
}

tripUtils 模块

引入

import {tripUtils} from 'mykits'

使用

// 实例 tripUtils
let options = {rsaPublicKey:"", rsaPrivateKey:"", appId:''}
let encrptyUtils = new tripUtils(options)
// 加密 返回密文
encrptyUtils.encrypt(serviceId,params) 

RsaUtils模块

引入

import {RsaUtils} from 'mykits'

使用

// 实例 RsaUtils
let rsa = new RsaUtils('rsaPublicKey')
// 加密 返回密文
rsa.encrypt({name: 123}) 

项目中的工具类

输出在 dist/utils/ 路径下 可单独使用