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

jsbackup

v5.0.0

Published

Backup utility in pure TypeScript

Downloads

19

Readme

jsbackup

Build Status npm version

A backup utility written in pure TypeScript.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See Installing for instructions on getting a production ready product.

git clone https://github.com/rugglcon/jsbackup
cd jsbackup
npm install
nvm use // this ensures you're always using a supported version of node
npm test

Prerequisites

nvm, npm and nodejs are the only requirements.

Installing

Install locally from npm:

npm install jsbackup

Install globally from npm:

npm install -g jsbackup

Or install from the cloned repo:

npm run dev

Examples:

# providing files to the program
$ jsbackup -c out.tar.gz file1.txt file2.txt

# extracting files
$ jsbackup -x out.tar.gz
import { compressFiles, extractTarball } from 'jsbackup';

// compresses a list of files
// Promise chaining example
compressFiles('foo.tar.gz', 'foo.txt').then(() => {
    console.log('Compressed files!');
}).catch(err => {
    console.error('Oh no!');
});

// using async/await
await compressFiles('foo.tar.gz', 'foo.txt');

// extracts a tarball
// Promise chaining example
extractTarball('foo.tar.gz').then(() => {
    console.log('Extracted files!');
}).catch(err => {
    console.error('Oh no!');
});

// using async/await
await extractTarball('foo.tar.gz');

Running the tests

jest is used to test jsbackup. To run the automated test suites, run npm test.

Roadmap

  • Support more types of compression (zip, bz2, 7z, etc.)
    • Extraction goes along with those
  • Support extracting to a specific directory
  • Support extracting more than 1 file at a time

Contributing

Don't really have many guidelines yet, just make sure to be descriptive in any issue submissions (i.e. please provide OS, node version, npm version, and possibly what kind of shell environment you're using. Any other information you could provide would be helpful as well) and remember to run the tests before submitting a PR, and to add tests for any features you might add to the project.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Connor Ruggles

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

  • the tar npm package for providing the brunt of the work
  • all contributors to Nodejs, npm, TypeScript, VSCode, jest, and all other tools that are used to create projects just like this