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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dodoex/core

v2.0.1

Published

1. 考虑到很多核心方法写在 core 项目,当方法报错时需要告知给用户报错内容。以便让用户知道错误,以及联系客服时能提供相应信息。所以将 toast 方法通过初次调用赋值的方式,传入 core 项目

Downloads

17

Readme

使用

  1. 考虑到很多核心方法写在 core 项目,当方法报错时需要告知给用户报错内容。以便让用户知道错误,以及联系客服时能提供相应信息。所以将 toast 方法通过初次调用赋值的方式,传入 core 项目
initCore({
  projectToastFailed: toastFailed,
  projectToastSuccess: toastSuccess,
});
  1. 其他按需使用即可

常用方法

错误捕获

监听到错误,需要上报到 sentry ,并提供有用的信息,方便修复。并根据实际情况看是否需要提示给用户

captureException(api, error, params)

问题

  1. get config rollup 不支持动态参数的 dynamic import, 见 https://github.com/rollup/rollup/issues/2463,所以 packages\dodoex-core\src\setting\getConfig\index.ts 文件中
    let { default: data } = await import(
      `./configs/${chain.localConfigPath}.json`
    );

的导入在 dodo-web 项目中使用时会报错,

./node_modules/@dodoex/core/dist/esm/index.js
Module not found: Can't resolve './configs' in 'C:\code\work\dodo-web\node_modules\@dodoex\core\dist\esm'
Compiling...
Failed to compile.

./node_modules/@dodoex/core/dist/esm/index.js
Module not found: Can't resolve './configs' in 'C:\code\work\dodo-web\node_modules\@dodoex\core\dist\esm'

这里不再使用动态参数,如果请求报错,则使用默认的空配置文件即可