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

oss-sdk

v1.0.8

Published

oss-sdk contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.

Readme

Quickstart

====================

NPM version NPM Install Size NPM Downloads NPM License

API Introduction...

======================================

1. Install

npm install oss-sdk

2. Import package

let url = 'D:\\demo';
const oss = require('oss-sdk');

3. API path

url = oss.path(url,'test')  // D:\\demo\\test

4. API cut

await oss.cut(oldRUL, newRUL);   //true or false  (dir or file)

5. API copy

await oss.copy(oldRUL, newRUL);   //true or false  (dir or file)

6. API rename

await oss.rename(oldRUL, newRUL); //true or false  (dir or file)

7 API dir

const dir = oss.dir(url);
await dir.ok()                  //true or false
await dir.ok('test')            //true or false
await dir.add()                 //true or false
await dir.add('00')             //true or false
await dir.add('01','02')        //true or false
await dir.list();                //Get the list 'D:\\demo\\test'
await dir.list('00');            //Get the list 'D:\\demo\\test\\00'
await dir.rename('00', '000');      //true or false
await dir.clear()                 //true or false
await dir.clear('01','02')        //true or false
await dir.dele()                  //true or false
await dir.dele('01','02')        //true or false

8. API file

const file = oss.file(url);
await file.add('01.txt','520')     //New File   'D:\\demo\\test\\01.txt'
await file.add('02.txt','22222')   //New File   'D:\\demo\\test\\02.txt'
await file.ok('01.txt')            //true or false    'D:\\demo\\test\\01.txt'
await file.size('01.txt')          //null or number   'D:\\demo\\test\\01.txt'
await file.get('01.txt')            //null or content   'D:\\demo\\test\\01.txt'
await file.push('01.txt','1314')     //Add text content  5201314   
await file.edit('01.txt','5200')     //Modify text content  5200          
await file.rename('01.txt','03.txt')  //true or false          
await file.dele('01.txt')             //Delete file
await file.dele('01.txt','03.txt')    //Batch delete files

9. API read


const kbps = 1024;                                     //1024kb
const encoding = 'utf8';                               //Default to null                
const stream =  oss.read(filePath);                    //No speed limit
const stream =  oss.read(filePath, kbps);              //Limit 1024kb per second
const stream =  oss.read(filePath, kbps, encoding);    //The output method is utf8
stream.start((data) => {
	// Process every piece of data
	console.log(data);
}).ok(() => {
	console.log('read completed');
}).err((msg) => {
	console.error('Read failed:', msg);
})
stream.ps(()=>{
	console.log('Pause reading');
}) 
stream.go(()=>{
	console.log('Continue reading');
})
stream.stop(()=>{
	console.log('Stop reading');
})

10. API log.input

const input = oss.log.input('D:\\demo\\test.txt');
//Use gzip to compress data
//If it doesn't exist, it will be created
input.start(()=>{
	input.add('Hello World!!')    //Write as append by default
	input.add('write data!!!')  //Write as append by default
	input.end(()=>{
		console.log('End writing');
	});
}).err((msg)=>{
	//console.log('Error message');
})

10. API log.output

const output = oss.log.output('D:\\demo\\test.txt');
//Use gzip to decompress data
output.start((data)=>{
	// 逐行读取
	is++
	// console.log(data);
}).err((msg)=>{
	//Printing error
	console.log(msg);
}).ps(()=>{
	console.log('Pause reading');
}).ok(()=>{
	console.log('read completed');
})
setTimeout(()=>{
	output.go(()=>{
		console.log('Continue reading');
	})
},1000)
setTimeout(()=>{
	output.stop(()=>{
		console.log('stop reading');
	})
},2000);

11. API tgz

const ignore ['node_modules'];
//compressed file
await oss.tgz.min('D:\\resources','D:\\resources\\backup.ant',ignore);
//extract files
await oss.tgz.max('D:\\resources\\backup.ant','D:\\resources\\new');