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

@sdkset/utils

v4.0.13

Published

Function library implementation

Downloads

39

Readme

简介

简单易用,性能出色的前端工具库。使用menorepo组织项目结构,支持模块单独引入。

  • 官网:https://true-z.github.io/sdkset-doc/

  • github:https://github.com/True-Z/sdkset

  • gitee:https://gitee.com/trueAlways/sdkset

安装

强烈建议使用pnpm or yran安装(npm暂不支持workspace语法,)。

pnpm add @sdkset/<pluginName>
or
yran add @sdkset/<pluginName>

使用

类型支持

import type { List } from '@sdkset/types'

ES module

import * as sdk from '@sdkset/all'
or
import * as anyName from '@sdkset/<pluginName>'

CommonJS

const { ... } = require('@sdkset/all')
or
const { ... } = require('@sdkset/<pluginName>')

UMD

<!-- 引入插件,全局对象:sdk<PluginName> -->
<script src="https://cdn.jsdelivr.net/npm/@sdkset/<PlginName>"></script>

<!-- 注意,对于存在对等依赖的 UMD 插件方法,需提前引入对应依赖,示例: -->
<script src="https://cdn.jsdelivr.net/npm/@sdkset/mode"></script>
<script src="https://cdn.jsdelivr.net/npm/@sdkset/core"></script>
<script>
  sdkSocket.useWebSocket().then( ... )
</script>

babel

webpack

  1. 安装依赖
pnpm add babel-loader @babel/core @babel/preset-env @babel/plugin-transform-runtime @babel/runtime-corejs3 -D
  1. webapck 配置
// webpack.config.js
module.exports = {
  ...
  module: {
    rules: [
      {
        test: /\.(ts|js)x?$/,
        exclude: /node_modules/,
        loader: 'babel-loader'
      }
    ]
  }
}
  1. babel 配置
// babel.config.js
module.exports = {
  presets: [
    [
      '@babel/env',
      {
        targets: ['defaults', 'not IE 11']
      }
    ]
  ]
  plugins: [
    [
      '@babel/plugin-transform-runtime',
      {
        corejs: { version: 3, proposals: true }
      }
    ]
  ]
}

vite

  1. 安装依赖
pnpm add @vitejs/plugin-legacy terser -D
  1. vite 配置
// vite.config.js
import legacy from '@vitejs/plugin-legacy'

export default {
  plugins: [
    legacy({
      targets: ['defaults', 'not IE 11']
    })
  ]
}

相关项目

| 插件名称 | 插件简介 | ES Module 支持 | Common 支持 | UMD 支持 | 全局对象 | | ------------ | ------------------------------------------------------------ | -------------- | ----------- | -------- | -------- | | sdkset/all | sdkset 插件集合 | ✅ | ✅ | | | | sdkset/types | sdkset 类型声明 | ✅ | | | | | sdkset/core | sdkset 工具插件集合 | ✅ | ✅ | ✅ | sdkCore | | sdkset/mode | mode 设计模式实现 | ✅ | ✅ | ✅ | sdkMode | | sdkset/utils | sdkset 函数库实现 | ✅ | ✅ | ✅ | sdkUtils |

主要项目负责人

@True-Z

参与贡献方式

欢迎提交 PR 申请,经过审查后,贡献代码会及时进行合并。

开源协议

MIT @True-Z