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

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 5.0.0 to 5.0.1

25

lib/fs.js

@@ -30,4 +30,12 @@ 'use strict'

function executor(resolve, reject) {
fs.readFile(path.resolve(file.cwd, file.path), options, done)
var fp
try {
fp = path.resolve(file.cwd, file.path)
} catch (err) {
return reject(err)
}
fs.readFile(fp, options, done)
function done(err, res) {

@@ -73,9 +81,12 @@ if (err) {

function executor(resolve, reject) {
fs.writeFile(
path.resolve(file.cwd, file.path),
file.contents || '',
options,
done
)
var fp
try {
fp = path.resolve(file.cwd, file.path)
} catch (err) {
return reject(err)
}
fs.writeFile(fp, file.contents || '', options, done)
function done(err) {

@@ -82,0 +93,0 @@ if (err) {

{
"name": "to-vfile",
"version": "5.0.0",
"version": "5.0.1",
"description": "Create a vfile from a file-path",

@@ -33,4 +33,3 @@ "license": "MIT",

"browserify": "^16.0.0",
"esmangle": "^1.0.1",
"nyc": "^11.0.0",
"nyc": "^12.0.0",
"prettier": "^1.12.1",

@@ -40,2 +39,3 @@ "remark-cli": "^5.0.0",

"tape": "^4.0.0",
"tinyify": "^2.4.3",
"xo": "^0.21.0"

@@ -45,4 +45,4 @@ },

"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
"build-bundle": "browserify index.js --bare -s toVFile > to-vfile.js",
"build-mangle": "esmangle to-vfile.js > to-vfile.min.js",
"build-bundle": "browserify . -s toVFile > to-vfile.js",
"build-mangle": "browserify . -s toVFile -p tinyify > to-vfile.min.js",
"build": "npm run build-bundle && npm run build-mangle",

@@ -49,0 +49,0 @@ "test-api": "node test",

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