New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

partdir

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partdir

Convert a filename to a partitioned directory and filename

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

partdir

If you need to store loads of files partdir can convert a filename to a hash where the leading part is used as a directory and the remainder as a filename.

Example

var path = require('path');
var partdir = require('partdir');

var parted = partdir('myfile.bin');
console.log(path.join(parted.dir, parted.file)

prints 2a/a3455b63e270b69736191c20c76a162c0c26e0.

Keywords

dir

FAQs

Package last updated on 17 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts