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

pyfiles

v2.1.0

Published

get file or folder locations using 'fs', results by array.

Downloads

31

Readme

pyfiles

get file or folder locations using 'fs', results by array

Getting Started

Installing

Installing pyfiles.

npm install pyfiles

How to use

| Code | Description | |------|------| |a| directory. | |b| recursive boolean (true or false), false by default | |c| filter name, type N by default | |d| filter items. empty array by default | |e| item result from r | |f| item filter from d | |g| directory name of e | |r| object pyfiles results | |r.all| object all file and directory from r| |r.files| get all file from r | |r.dirs| get all directory from r |

Using Require

consr pyfiles = require('pyfiles');
const a = 'directory_address';
const b = true; // recursive
const c = 'include-extension' // filter type;
const d = ['php','js'] // f;
const r = new pyfiles(a,b,c,d);

const all = r.all; // all results
const files = r.files; // all file results
const dirs = r.dirs; // all dir results

console.log("total results all: " + all.length);
console.log("total results files: " + files.length);
console.log("total results dirs: " + dirs.length);

console.log("results dirs:\n");
console.log(dirs);

console.log("results files:\n");
console.log(files);

console.log("results all:\n");
console.log(all);

Filters

pyfiles have include,exclude and N filter type name for filtering item result. N default for deactive pyfile filter.

Filter Include

| Name | Description | | ------ | ------ | | include-equals | filter e === f | | include-dir-equals | filter e === g + f | | include-indexof | filter using indexOf [e.indexOf(f) !== -1] | | include-dir-indexof | filter using indexOf [e.indexOf( g + f ) !== -1] | | include-indexof-first | filter using indexOf from e first index | | include-dir-indexof-first | filter using indexOf from e first index use g + f | | include-regex | filter using match [e.match( f )] | | include-extension | filter using path.extname [path.extname(e) === f] |

Filter Exclude

| Name | Description | | ------ | ------ | | exclude-equals | filter e === f | | exclude-dir-equals | filter e === g + f | | exclude-indexof | filter using indexOf [e.indexOf(f) !== -1] | | exclude-dir-indexof | filter using indexOf [e.indexOf( g + f ) !== -1] | | exclude-indexof-first | filter using indexOf from e first index | | exclude-dir-indexof-first | filter using indexOf from g + e first index use g + f | | exclude-regex | filter using match [e.match( f )] | | exclude-extension | filter using path.extname [path.extname(e) === f] |

Filter N

| Name | Description | | ------ | ------ | | N | default |

Using Cli

for now cli not support for filtering

npm run pyfiles arg1 arg2 arg3
  1. arg1 = dirname.
  2. arg2 = all,files,dirs by default all.
  3. arg3 = reqursive boolean (true or false), false by default

License

MIT