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

wodebaobao

v1.0.1

Published

提供了时间格式化,HTMLEscape相关的功能

Downloads

9

Readme

##安装

npm install wode-bo

##导入

const buling = require('./wode-bao') 

##格式时间

时间格式化 缩写sjgsh   方法名 sjgsh() 

const ds = buling.sjgsh(new Date())

//补零 缩写bl 方法名 bl()
const dd = buling.bl();

##HTML转换字符

//HTML转换字符 方法名 htmlzhuan()

const dds = '<h1>123</h1>'
const fafa = buling.htmlzhuan(dds);
console.log(fafa);
转换结果 &lt;h1&gt;123&lt;/h1&gt;

##还原HTML转换字符

//字符转换HTML 方法名 zhuanhtml()
const htll = buling.zhuanhtml(fafa);
console.log(htll);
结果 <h1>123</h1>

##下载nrm工具

安装成全局工具
npm i nrm -g

##如果nrm无法使用

如果显示如下报错:
nrm : 无法加载文件 C:\Users\HP\AppData\Roaming\npm\nrm.ps1,因为在此系统上禁止运行脚本。
则需要执行如下代码:
1.以管理员身份运行powershell

2.使用set-ExecutionPolicy RemoteSigned命令将计算机上的执行策略更改为 RemoteSigned,输入Y确定

3.查看计算机执行策略get-ExecutionPolicy

##通过终端登陆npm

npm longin 发起登陆

会显示如下代码:
Username: 用户名
Password: 密码//注意密码输入的看不见需要盲打
Email: (this IS public) 邮箱

##发布包

cd切换到包的根目录
PS G:\上课素材\xuexiziyiao\xuexi\jichuban\nodeJS\3node> cd wode-bao
切换后
PS G:\上课素材\xuexiziyiao\xuexi\jichuban\nodeJS\3node\wode-bao> 
发布包
npm publish 








##查看下包地址

nrm ls

npm config get registry

##nrm use 地址名 切换下包地址

nrm use 地址名 切换下包地址 npm config get registry=htttp://registry.npm.taobao.org