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

copy-to-range

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-to-range

Copy files to a range of directories.

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

copy-to-range

Build Status Current npm package version

Copy a file to a range of directories.

Installation

npm install --save copy-to-range

Usage

const copyToRange = require('copy-to-range');

copyToRange('file.txt', '1-4');
$ tree
.
├── file.txt
├── 1
│   └── file.txt
├── 2
│   └── file.txt
├── 3
│   └── file.txt
├── 4
│   └── file.txt
│ ...

With options:

const copyToRange = require('copy-to-range');

copyToRange('file.txt', '11-13,20', {
    destination: 'out',
    append: 'a',
    prepend: 'p'
});
$ tree
.
├── file.txt
├── out
│   ├── p11a
│   │   └── file.txt
│   ├── p12a
│   │   └── file.txt
│   ├── p13a
│   │   └── file.txt
│   └── p20a
│       └── file.txt
│ ...

Options

PropertyDescriptionDefault
destinationDestination directory""
appendString to append to directory names""
prependString to prepend to directory names""
  • copy-to-range-cli - CLI for this module
  • make-dir-range - Make directories from a range of integers
  • move-to-range - Move files to corresponding directories given a range

Authors

  • Austin Gordon - Development - GitHub

License

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

Keywords

cp

FAQs

Package last updated on 26 Nov 2018

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