Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cpy

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cpy - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

8

index.js

@@ -43,6 +43,10 @@ 'use strict';

module.exports = function (src, dest, opts) {
if (!(Array.isArray(src) && src.length > 0) || !dest) {
return Promise.reject(new CpyError('`src` and `dest` required'));
if (!Array.isArray(src)) {
return Promise.reject(new CpyError('Expected `files` to be an array, got ' + typeof src));
}
if (src.length === 0 || !dest) {
return Promise.reject(new CpyError('`files` and `destination` required'));
}
opts = opts || {};

@@ -49,0 +53,0 @@

{
"name": "cpy",
"version": "4.0.0",
"version": "4.0.1",
"description": "Copy files",

@@ -56,3 +56,2 @@ "license": "MIT",

"ava": "*",
"execa": "^0.1.1",
"tempfile": "^1.1.1",

@@ -59,0 +58,0 @@ "xo": "*"

@@ -26,3 +26,3 @@ # cpy [![Build Status](https://travis-ci.org/sindresorhus/cpy.svg?branch=master)](https://travis-ci.org/sindresorhus/cpy)

cpy(['src/*.png', '!src/goat.png'], 'dist']).then(() => {
cpy(['src/*.png', '!src/goat.png'], 'dist').then(() => {
console.log('files copied');

@@ -79,3 +79,3 @@ });

- [cpy-cli](https://github.com/sindresorhus/cpy-cli) - CLI for this module
- [cp-file](https://github.com/sindresorhus/cp-file) Copy a single file
- [cp-file](https://github.com/sindresorhus/cp-file) - Copy a single file

@@ -82,0 +82,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc