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

axnglu

v2.0.0

Published

Tool for splitting and joining files.

Downloads

2

Readme

Ax'n'glu

Utility to split and join files for easy storage or transfer.

$ axnglu split myFile.7z --size 200mb
$ axnglu join myFile.7z.001

Install

npm install [-g] axnglu

API

import { splitBySize, splitByParts, join } from 'axnglu'

splitByParts (
  filePath: string,
  parts: number,
  deleteOriginalFile = false
) => Promise<string[]>

splitBySize (
  filePath: string,
  size: number | string,
  deleteOriginalFile = false
) => Promise<string[]>

join (
  filePath: string,
  deleteOriginalFile = false
) => Promise<string>

The methos return a Promise that fulfills into the path(s) of the generated file(s).

Please note that size can be the number of bytes, or a string with units ('100mb', '4.37gb', etc).

Examples

import { splitBySize, splitByParts, join } from 'split-file.js'

// Split file in parts of 100MB
const fragmentsPaths = await splitBySize('path/to/my-large-file.7z', '100mb')

// Split the file into 7 fragments and delete the original file
const fragmentsPaths2 = await splitByParts('path/to/my-large-file-2.7z', 7, true)

// Join the fragments and remove them
const joinedFile = await join(fragmentsPaths[0], true)

CLI

Install

$ npm install -g axnglu

Usage

$ axnglu <command> <file> <options>
$ axnglu [--interactive, -i]
$ axnglu <file>
$ axnglu


Commands:
  split, s, axe, ax     Split the given filen by number of parts or size of each part.
  join, j, glue, glu    Finds the corresponding fragments of the given file and joins them.


Options:
  --size, -s            (String) Size of each file fragment.
  --parts, -p           (Number) Number of fragments/parts.
  --fragments, -f       (Number) Number of fragments/parts.
  --clean, -R, -D       Remove original file(s).
  --help, -h            Displays help


Examples:
  axnglu split big-file.zip --size 250mb
  axnglu axe big-file.zip -s 4.37gb -D
  axnglu s big-file.zip --fragments 5
  axnglu join big-file.zip.001
  axnglu j big-file.zip.001
  axnglu glue big-file.zip.001 --clean

Contribution

Feel free to open an issue if you have any ideas or suggestions that could improve this tool.