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

ls-base-lib

v2.0.2

Published

A library with no framework dependencies (e.g. vue) that encapsulates some pure native js and css. It is exported using module and umd.

Downloads

201

Readme

ls-base-lib

基于纯JavaScript和CSS的工具库,无框架依赖,支持UMD和ES模块格式。

A library with no framework dependencies that encapsulates pure native JS and CSS. Supports both UMD and ES module formats.

安装 | Installation

使用 npm | Using npm:

npm install ls-base-lib

功能特点 | Features

  • 框架无关 - 不依赖Vue等框架 | Framework independent - no Vue or other framework dependencies
  • 纯原生JavaScript和CSS工具 | Pure native JavaScript and CSS utilities
  • 完整的TypeScript类型支持 | Full TypeScript type definitions
  • 支持UMD和ES模块格式 | Supports both UMD and ES module formats

主要组件 | Main Components

  1. AwaitTo - 异步/等待错误处理工具 | Async/await error handling utilities
  2. EventDispatcher - 事件管理系统 | Event management system
  3. Verify - 数据验证工具 | Data validation utilities
  4. WebSocketLinker - WebSocket连接管理 | WebSocket connection management
  5. 实用工具函数 | Utility Functions
    • 数组工具 | Array utilities
    • 文档工具 | Document utilities
    • 函数工具 | Function utilities
    • 图像工具 | Image utilities
    • 字符串工具 | String utilities
    • 树形结构工具 | Tree utilities
    • Vue工具 (可选) | Vue utilities (optional)

文档 | Documentation

详细API文档请访问 | For detailed API documentation, visit: API Documentation

使用示例 | Usage Examples

// ES模块导入 | ES Module import
import { Verify, EventDispatcher } from 'ls-base-lib';

// CommonJS导入 | CommonJS require
const lsBaseLib = require('ls-base-lib');

开发 | Development

# 启动开发服务器 | Start development server
npm run dev

# 构建库 | Build library
npm run buildLib

# 构建文档 | Build documentation
npm run buildHtml

# 构建CSS | Build CSS
npm run buildCss

# 运行测试 | Run tests
npm run test

许可证 | License

本项目基于MIT许可证开源。 | This project is licensed under the MIT License.

代码仓库 | Repository

GitHub Repository

项目主页 | Homepage

Project Homepage

示例代码 | Demos

在线示例 | Live Demos