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

jbd

v2.2.32

Published

jBD Framework's Core

Downloads

18

Readme

jBD

NPM version

jBD是什么?

针对ES6的JS工具库,部分功能兼容ES5

jBD有哪些功能?

  • 工具库
    • 核心 —— 常用的is类型判断
    • check —— 文本内容校验
    • conver —— 数据转换
    • date —— 时间计算
    • security —— 安全性算法(MD5、CRC、SHA)
    • regexp —— 正则辅助工具
    • string —— 字符串工具
  • Web端
    • CMD模块加载,参考了seajs代码,并进行了模块参数的优化
    • cookiehistorystoragerequest对象简化操作
    • dom操作,参考了jQuery代码,并进行了一定的优化和事件扩展(未完成)
    • 针对Mobile端的手势识别,进行了一定的扩展
  • Node端
    • fs —— 针对json、log、file文本类文件进行读写操作封装

    • db —— mongodb、mysql、redis数据库操作封装(目前此功能合并至jsvr中,后期会在jBD项目中取消引用)

    • log —— log文件生成、记录、检索操作封装

    • net —— 网络操作封装

    • zip —— zip、tar压缩文件封装

    • protocol —— 数据包协议解析

安装与使用

  • 安装
npm install jbd
  • Node.js使用

jBD模块拥有自动过载性质,在首次执行后会在global对象中建立jBD对象映射,以方便在后续任意模块中使用,所以建议在启动文件的顶部进行申明引用

const jBD = require("jbd");
console.log(jBD.version());
  • Web使用

jBD模块基于CMD方式,进行懒加载。需要使用入口函数进行调用。 以下两种加载方式,效果略有不同

  • 全模块加载
<script type="text/javascript" src="/inc/jBD/jBD.js"></script>
<script type="text/javascript">
jBD.use(function(){
    //此时jBD所有模块会被全部载入,相对加载时间较长
});
</script>
  • 按需加载
// /usr/test.js
jBD.define(function (module, exports, require) {
// 此时模块只引入jBD.Check、jBD.Conver模块,jBD中其他模块无法使用
}, {module: this, exports: this}, ["Check", "Conver"], "test");
// index.html
<script type="text/javascript">
jBD.use("test.js"); //模块默认加载/usr目录下对应文件
</script>

问题反馈

在使用中有任何问题,欢迎在issues中进行反馈。

感激

感谢以下的项目,排名不分先后。

License

MIT