Socket
Socket
Sign inDemoInstall

hotfile

Package Overview
Dependencies
0
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

5

index.js

@@ -78,8 +78,9 @@ const p = require('path')

async moveTo(toPath){
async moveTo(toPath, name){
if(toPath instanceof Hotfile) {
if(!toPath.isDirectory) throw('you can not move to a file, please provide a directory path')
toPath = toPath.path
toPath = name ? p.join(toPath.parent, name) : toPath.path
}
if(!p.extname(toPath)) toPath = p.join(toPath, this.filename())
if(await this.exists(toPath)) return false
return fs.promises.rename(this.path, toPath).then(async () => {

@@ -86,0 +87,0 @@ await Object.assign(this, new Hotfile(toPath))

2

package.json
{
"name": "hotfile",
"version": "0.0.4",
"version": "0.0.5",
"description": "",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc