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

orcrist-utils

v1.1.1

Published

rollup orcrist utils

Downloads

5

Readme

orcrist-utils

traceLog api

1、import { traceLog } from 'orcrist-utils';

2、traceLog({ log: encodeURIComponent(errorLog), scene: 'xxxx', });

身份证姓名校验 checkCNName 校验规则:仅只是中文和 中文·

  1. import {checkCNName} from 'orcrist-utils';
  2. checkCNName(value) 返回值类型 boolean true -- 格式正确 false -- 格式错误

非身份证姓名校验 checkName 校验规则: 支持中文和英文以及数字 特殊字符除外

  1. import {checkName} from 'orcrist-utils';
  2. checkName(value) 返回值类型 boolean true -- 格式正确 false -- 格式错误

身份证证件号校验 18 位 || 15 位

  1. import {checkIdNo} from 'orcrist-utils';
  2. checkIdNo(value)返回值类型 boolean true -- 格式正确 false -- 格式错误

证件号-护照校验

  • 1、总长度:9 位;
  • 2、第 1-2 位:字母或阿拉伯数字;
  • 3、第 3-9 位:阿拉伯数字
  1. import {checkPassNo} from 'orcrist-utils';
  2. checkPassNo(value) 返回值类型 boolean true -- 格式正确 false -- 格式错误

证件号-港澳居民来往内地通行证校验

  • 1、9 位或者 11 位;
  • 2、第 1 位为字母,“H”或“M”;
  • 3、第 2 位-11 位或者第 2 位-8 位为阿拉伯数字
  1. import {checkHMNo} from 'orcrist-utils';
  2. checkHMNo(value) 返回值类型 boolean true -- 格式正确 false -- 格式错误

证件号-台湾居民来往大陆通行证校验

  • 总长度:8 位,均为阿拉伯数字
  1. import {checkTWNo} from 'orcrist-utils';
  2. checkTWNo(value) 返回值类型 boolean true -- 格式正确 false -- 格式错误

手机号校验

  1. import {checkPhoneNo} from 'orcrist-utils';
  2. checkPhoneNo(value)返回值类型 boolean true -- 格式正确 false -- 格式错误

根据身份证号获取出生年月日

  1. import {getBirth} from 'orcrist-utils';
  2. getBirth(id) 返回值类型 string '1990/01/03'

年龄校验-身份证号

  • output : true 未成年人 false 成年人
  1. import {isChildById} from 'orcrist-utils';
  2. isChildById(value) 返回值类型 boolean true -- 未成年人 false -- 成年人

年龄校验-非身份证号 (出生年月选择器 格式 '1994-11-26')

  • input value 格式 string '1994-11-26'
  • output : true 未成年人 false 成年人
  1. import {isChildByDate} from 'orcrist-utils';
  2. isChildByDate(value) 返回值类型 boolean true -- 未成年人 false -- 成年人

邮箱校验

  1. import {checkEmail} from 'orcrist-utils';
  2. checkEmail(value) boolean true -- 格式正确 false -- 格式错误