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

lj-utils

v0.5.3

Published

uni-app utils

Downloads

115

Readme

lj-utils

minzipped stars Website release license tree

介绍

lj-utils 为本人整理的 js 通用库,目录结构:

  • lj-utils/index:公共 JavaScript 工具函数和常量,适用于各种前端框架和 node 应用程序。
  • lj-utils/microApi: 基于 uniapp 小程序开发 API 封装。
  • lj-utils/mixins:Vue.js 混入(mixins)。
  • lj-utils/class:通用类。
  • lj-utils/directive:Vue.js 自定义指令(directive)
  • lj-utils/scss:通用的 SCSS 样式库
  • lj-utils/less:通用的样式库 less 版本

仓库

github https://github.com/LinJieLinLin/utils

gitee https://gitee.com/uni-pro/utils

安装教程(npm/yarn/pnpm)

  • npm i lj-utils
  • yarn add lj-utils
  • pnpm i lj-utils

使用说明:

esm 引用

import { setTitle } from 'lj-utils'
setTitle('hi')
// 或
import * as ljUtils from 'lj-utils'
ljUtils.setTitle('hi')

node 引用

const ljUtils = require('lj-utils')

浏览器中引用,挂载在 window.ljFn 中

<head>
  <script src="https://lj4.top/utils/lj-utils/index.umd.js"></script>
  <script>
    window.onload = function () {
      console.log(window.ljFn)
    }
  </script>
</head>

在线文档

访问 latest: https://linjielinlin.github.io/utils/lj-utils/index.html

或访问 http://lj4.top/utils/lj-utils/index.html

若编译失败,在 vue.config.js 添加以下代码

transpileDependencies: ['lj-utils'],

自动引入 lj-utils/index 公共函数(unplugin-auto-import/vite)

// vite.config.ts
import AutoImport from 'unplugin-auto-import/vite';
import { ljResolver } from 'lj-utils/resolver.js';
AutoImport({
  ...,
  resolvers: [ljResolver()],
})

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request