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

unizone-password-verify

v0.1.8

Published

Javascript版本

Downloads

4

Readme

密码规范校验工具

Javascript版本

配置本地npm环境

配置NPM仓库地址

npm config set registry http://192.168.1.61:8889/repository/npm-group/

登录账号

登录本地包仓库,用于发布包 按提示操作,依次填写 用户名、密码、邮箱 (目前仅开放给前端小组成员)

  • 用户名规则:nx-npm-user-姓名的拼音小写
  • 默认密码:unizone
  • 邮箱:姓名的拼音小写@unizone.tech
// 登录到本地包仓库
npm login --registry=http://192.168.1.61:8889/repository/npm-hosted/

发布包

npm publish --registry=http://192.168.1.61:8889/repository/npm-hosted/

常见问题

1、报401

编辑 C:\User\用户名\.npmrc 文件
在底部添加两行内容
//192.168.1.61:8889/repository/npm-group/:_authToken=和npm-hosted的相同
//192.168.1.61:8889/repository/npm-proxy/:_authToken=和npm-hosted的相同

使用

安装

npm i unizone-password-verify

导入

const PasswordVerifyUtils = require('unizone-password-verify')

验证

// PasswordVerifyUtils.checkPassword('密码', '账号或其它用于校验是否相关联的字符串')

console.log(PasswordVerifyUtils.checkPassword('chenzhiduanA1', 'Changeden')) // true
console.log(PasswordVerifyUtils.checkPassword('chenzhiduanA1@', 'Changeden')) // true
console.log(PasswordVerifyUtils.checkPassword('chenzhiduan1@', 'Changeden')) // true
// 与账号相关联(忽略大小写)
console.log(PasswordVerifyUtils.checkPassword('changedenA1@', 'Changeden')) // false
// 键盘连续3个
console.log(PasswordVerifyUtils.checkPassword('chenzhiduanAbcd@', 'Changeden')) // false

// 自定义通用词名单
PasswordVerifyUtils.customCommonWords(['unizone', 'Yzwl', 'Changeden'])
// 自定义键盘连续键名单
PasswordVerifyUtils.customKeyboardChain(['asdfghjkl', 'qwertyuiop'], 4) // 最多4个连续