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

wack

v0.3.9

Published

wack ack

Downloads

97

Readme

wack

Build Status npm install

wack stands for Wack ACK

what?

wack aims to be a bit like ack but implemented in node. it doesn't aim to be wack, but it kind of is at the moment.

installation

npm install -g wack

usage

wack searchPattern

will search the current dir (and recursively all sub dirs) for searchPattern

options

  • -d or --dir <dir> search different dir.
  • -D or --ignoredir <dir1[,dir2...]> to ignore directories
  • -i or --ignorecase to ignore case
  • -n or --norecurse to prevent subdirectory search
  • -m or --maxcount <num> show max of <num> results per file
  • -k or --knowntypes only search files of known type
  • -t or --type <type1[,type2...]> only show results from file types listed
  • -T or --notype <type1[,type2...]> exclude results from file types listed
  • -C or --nocolor to turn off output coloring
  • -1 or --justone to only return the very first result
  • -v or --invertmatch to return lines that do not match the search pattern
  • -h or --help for help
  • -V or --version for version

as a module

alternatively, you can write directory names to wack and it will stream search results.

that looks kinda like this:

var wack = require('wack')

var wack_stream = wack({pattern: 'Sheena'})

wack_stream.on('data', dump)

wack_stream.write('./ramones_albums/')

function dump(data) {
  console.log(data)
// {
//     filename: /current/dir/ramones-albums/rocket-to-russia.txt
//   , context: 'Sheena Is a Punk Rocker'
//   , line: 6
//   , match: ['Sheena', index: 0, input: 'Sheena Is a Punk Rocker']
// }
}

for stream options, use the full flag name (ie ignorecase, invertmatch, etc) and pattern for the search pattern.

file types

file types are exactly the same as ack, except I have added markdown (which checks .md, .mkd, and .markdown) and json (which checks .json).

license

MIT