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

console-next

v0.1.10

Published

This allows you to do some weird and useless in the browser's devtools

Downloads

3

Readme

This allows you to do some weird and useless in the browser's devtools.

Installation

Simply load it from a CDN:

<script src="https://unpkg.com/console-next"></script>

use npm:

npm i console-next

Usage

import 'console-next'

console.npm

This methods help to you install npm packages in the devtools

console.npm('module_name',{
  type?: 'module'
})

Import specific version:

console.npm('[email protected]')

use URL:

console.npm('https://unpkg.com/[email protected]/lodash.js')

🌰 example:

(async function () {
  await console.npm("loadsh")
  console.log(_.random(5)) //2
})()

console.color()

It can help you print out color information in the devtools

console.color([
  {
    color?: string,
    content?: any,
    backgroundColor?: string
  }
])

🌰 example:

console.color([
  {
    color: 'red',
    content: 'red',
    backgrounColor: 'rgb(0, 255, 0)'
  },
  {
    color: 'rgb(0, 255, 0)',
    content: 'green'
  },
  {
    color: '#000FFF',
    content: 'blue'
  }
])

console.img

if you want to print images in the devtools, let's use it

console.img(url, {
  width?: number,
  height?: number
})

Example:

console.img('https://static.npmjs.com/58a19602036db1daee0d7863c94673a4.png', { width: 40, height: 40 })

console.video

If you still want to watch video in devtools, you must try it

console.video(url, {
  width?: number,
  height?: number,
  loop?: boolean
})

Example: Play "Big Buck Bunny" in console!

console.video(
  // from https://en.wikipedia.org/wiki/Big_Buck_Bunny
  'https://upload.wikimedia.org/wikipedia/commons/transcoded/c/c0/Big_Buck_Bunny_4K.webm/Big_Buck_Bunny_4K.webm.480p.vp9.webm',
  { width: 400, height: 200 }
)

console.edit

This methods allows you webpage as editor

If no arguments are passed, all webpage will as editor

console.edit()

Of course, you can also pass parameters and select a DOM as the editor

console.edit('#app')

console.dom

This methods will print dom elements in devtools

If no arguments are passed, will print 'document.body'

console.dom()

Of course, you can also pass parameters and select a DOM to print

console.dom('#app')

console.loading

a loading gif

console.loading('loading...')

console.progress

just a progressbar in devtools

console.progress(percentage: number, callback: () => percentage, ms: number)

Example: The progress bar increases by 5 every 200 milliseconds

{
  let i = 5
  console.progress(i, () => i += 5, 200)
}