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

dalang

v0.1.6-alpha.5

Published

A simplified puppeteer for use with puppeteer (alpha pre-release)

Downloads

6

Readme

dalang

A simplified puppeteer for use with puppeteer. Includes both an API for use in node, and a scripting language called dalang script.

Versions

  • 0.1.6-alpha.4 (latest) (based on puppeteer 5.5)
  • 0.1.6-alpha.3 (based on puppeteer 5.5)
  • 0.1.5-alpha.4 (based on puppeteer 1.20)
  • 0.1.4-alpha.3 (based on puppeteer 1.11)
  • 0.1.4-alpha.2
  • 0.1.4-alpha.1
  • 0.1.3 (based on puppeteer 1.3)

Overview

dalang abstracts the puppeteer API, allowing the focus to be on writing tests. It is a simple yet powerful API and scripting language, designed to take much of the pain out of writing and updating automation and regression tests for web pages.

Puppeteer is a powerful automation tool for google chrome, but it requires a fair amount of code to do even the simplest things. The idea behind dalang and dalang script is to hide all the complication inside the API and script engine and expose the power of puppeteer through the simplest of APIs or commands.

Simple and quick was the goal behind this project.

Release Notes

  • Version 0.1.6.alpha.4 is now available.
    • Adds a new script command.

Example dalang script

browser headless 0
browser start
browser size 1024,768
browser get "https://github.com/search/"
wait 30
select "*[name='q']" 
send "dalang user:redskyit"
select "button[type='submit']" 
click
sleep 10

Installation

npm i dalang --save-dev

Using dalang API

const dalang = require('dalang');
(async () => {
  await dalang.config({ headless: false });
  await dalang.start({ width: 1024, height: 768 });
  await dalang.get('https://github.com/search');
  await dalang.wait(30);
  await dalang.select('*[name="q"]');
  await dalang.send('dalang user:redskyit');
  await dalang.select('button[type="submit"]');
  await dalang.click();
  await dalang.sleep(10);
  await dalang.close();
})();

Using dalang script

const dalang = require('dalang');
dalang.run('/path/to/script');

Documentation

Dalang Script Language Syntax

https://github.com/redskyit/dalang/wiki/Language-Syntax-(v0.1)