New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

io-extra

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io-extra - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

17

io/directory.js

@@ -19,2 +19,18 @@ const fs = require('fs-promise');

function rename(src, dest, overwrite = true) {
const func = () => fs.rename(src, dest).then(() => path(dest));
if (overwrite) {
return func();
}
return exists(dest).then((alreadyExists) => {
if (alreadyExists) {
return path(dest);
}
return func();
});
}
function copy(src, dest, options = {}) {

@@ -42,3 +58,4 @@ const opts = Object.keys(options)

delete: remove,
rename,
copy,
};

2

package.json
{
"name": "io-extra",
"version": "0.0.7",
"version": "0.0.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -197,2 +197,3 @@ # io-extra

- [remove](#remove-directory)
- [rename](#rename-directory)
- [copy](#copy-directory)

@@ -263,2 +264,19 @@

### rename directory
**rename(src, dest, [overwrite])**
Renames a directory. Promise returns the full path of the destination directory.
- overwrite: (optional boolean) overwrite existing directory, default is `true`.
Example:
```js
const io = require('io-extra');
io.directory.rename('/tmp', '/bak')
.then((directory) => console.log('directory renamed to ' + directory));
```
### copy directory

@@ -265,0 +283,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