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 🙏

© 2025 – Pkg Stats / Ryan Hefner

big-file-stream

v1.0.10

Published

Copy file using streams from source to destination

Readme

Within the root of the project, copy any large big file from src directory to destination directory at ease using the copy function. UPDATE v 1.0.9: Minor bug fixes for copyFromHttp and updated Readme for more uses of copyFromHttp. see updated examples below: UPDATE v 1.0.8: New function copyFromHttp added. Signature: copyFromHttp = (url:string,{options:Object,data:string or Buffer or Uint8Array,fileName:string,secure:boolean}) Usage: By Default your request is sent over secure http connection: you can pass any http url here, the response will be saved in the fileName which is nothing but the last part of the url(in the below case its fileName.txt,1,allusers) copyFromHttp("https://exampledomain.com/fileName.txt"); copyFromHttp("https://exampledomain.com/api/1"); copyFromHttp("https://exampledomain.com/allusers"); if you want to override the fileName, you can give fileName key as second paramter like below: copyFromHttp("https://exampledomain.com/allusers",{fileName:"everyusers.java"}); download any software with exact download link of file: copyFromHttp("https://vscode.download.prss.microsoft.com/dbazure/download/stable/bf9252a2fb45be6893dd8870c0bf37e2e1766d61/VSCodeUserSetup-x64-1.106.3.exe",{fileName:"vscode.exe"}); For insecure connections: copyFromHttp("http://exampledomain.com/fileName.txt",{secure:false}); The last path value becomes the fileName and will be saved in root project directory as the same. For other than GET request, options parameter is mandatory. For post data, pass the "data" parameter. if it is json, you need to stringify it using JSON.stringify before passing the data. options parameter is same as the options paramter of http.request method in Node.js. Usage in app: import copy from "big-file-stream"; copy("data/anyexistingfile.txt","data1/data2/data3/newcopy.txt"); Signature of copy function: copy(sourceFilePath,destinationFilePath) Highlights: No dependencies Small 3Kb See live completed percentage, transfer speed and Time take to copy in console directly

Whats supported as of now: Support only copying single file in single call Avoids memory leak by closing both read and write stream on error

Future Update: Data streaming Multiple file streaming

Tested in Node js 20