Socket
Socket
Sign inDemoInstall

to-vfile

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to-vfile - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

18

lib/fs.js
'use strict'
var fs = require('fs')
var path = require('path')
var vfile = require('./core')

@@ -29,3 +30,3 @@

function executor(resolve, reject) {
fs.readFile(file.path, options, done)
fs.readFile(path.resolve(file.cwd, file.path), options, done)

@@ -51,3 +52,3 @@ function done(err, res) {

var file = vfile(description)
file.contents = fs.readFileSync(file.path, options)
file.contents = fs.readFileSync(path.resolve(file.cwd, file.path), options)
return file

@@ -73,3 +74,8 @@ }

function executor(resolve, reject) {
fs.writeFile(file.path, file.contents || '', options, done)
fs.writeFile(
path.resolve(file.cwd, file.path),
file.contents || '',
options,
done
)

@@ -91,3 +97,7 @@ function done(err) {

var file = vfile(description)
fs.writeFileSync(file.path, file.contents || '', options)
fs.writeFileSync(
path.resolve(file.cwd, file.path),
file.contents || '',
options
)
}
{
"name": "to-vfile",
"version": "4.0.0",
"version": "5.0.0",
"description": "Create a vfile from a file-path",

@@ -5,0 +5,0 @@ "license": "MIT",

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