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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ieval

v1.3.1

Published

javascript async interpreter. Through it, dynamically updates codes can be implemented

Readme

What can it do?

  • Reduce the size of your wechat mini program
  • Help you convert your static audit code to dynamically executed code, implementing dynamic eval on projects without an eval environment
  • When you implement the 'document' 'window' context object in an environment that does not support a browser, we can use it for low-code, multi-platform dynamic load execution

How does it work?

  • I tried to implement dynamic code execution through the syntax tree of @babel/parser
  • But 'ieval' needs to specify the context of the implementation, because each individual environment should be maintained by the business itself, otherwise it will greatly increase our maintenance costs

What are its advantages?

  • In contrast to EVAL5 and CanJS, which are executed based on "Acorn" code, although "@babel/ Parser" is also based on it, But parts of the code are actually incompatible, so 'ieval' can be run entirely directly with code compiled by Babel, or directly with AST code generated by '@babel/ Parser'
  • We implemented complete unit tests, including switch if break operator function var return ...

Documentation

install

npm install ieval

DocumentEval Class

import {DocumentEval} from 'ieval';

// To set the URL request, 'ieval' needs to return a complete executable code string via 'Promise'
DocumentEval.setNetwork(url => {
  return new Promise(resolve => {
    wx.request({
      url: url,
      success: data => {
        resolve(data.data);
      },
    })
  });
});

// This environment variable is especially important because it is needed for system objects that we depend on in our JS code, such as window global document
// If the code currently executing does not need the system object we can leave it blank to avoid security issues during execution
const context = {};

const ieval = new DocumentEval(context);

// Insert your URL connection in the context
ieval.appendUrl('https://image.xxx.com/echarts.js');
ieval.appendUrl('https://image.xxx.com/vue.js');

// We then use 'getWindow' to get the global variable declared in the code we execute
const ctx = await ieval.getWindow();

// run.
ctx.echarts.init();

iEval Function

import {iEval} from 'ieval';
// We then use 'getWindow' to get the global variable declared in the code we execute
// If the code currently executing does not need the system object we can leave it blank to avoid security issues during execution
const context = {};
// Insert your URL connection in the context
const ieval = iEval(['console.log("start.")', 'https://image.xxx.com/echarts.js', 'https://image.xxx.com/vue.js','console.log("end.")'], context);

const ctx = await ieval.getWindow();

// run.
ctx.echarts.init();
In this way we have implemented a basic resource load execution

Matters needing attention

  • It is important to include appropriate context objects in the current environment. If the current environment does not have system objects in use, we can set it to {}.