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

read-yaml-file

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-yaml-file - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

7

CHANGELOG.md
# read-yaml-file
## 2.1.0
### Minor Changes
- bba9985: graceful-fs and mz removed from dependencies.
## 2.0.1
### Patch Changes

@@ -5,0 +12,0 @@

7

index.js
'use strict'
const fs = require('graceful-fs')
const fs = require('fs')
const stripBom = require('strip-bom')
const yaml = require('js-yaml')
const { promisify } = require('util')
const readFile = promisify(fs.readFile)
const parse = data => yaml.load(stripBom(data))
const readYamlFile = fp => readFile(fp, 'utf8').then(data => parse(data))
const readYamlFile = fp => fs.promises.readFile(fp, 'utf8').then(data => parse(data))

@@ -14,0 +11,0 @@ module.exports = readYamlFile

{
"name": "read-yaml-file",
"version": "2.0.1",
"version": "2.1.0",
"license": "MIT",

@@ -27,3 +27,2 @@ "main": "index.js",

"dependencies": {
"graceful-fs": "^4.2.4",
"js-yaml": "^4.0.0",

@@ -34,5 +33,5 @@ "strip-bom": "^4.0.0"

"package-preview": "3.0.0",
"standard": "^16.0.1",
"tape": "^5.0.1"
"standard": "^16.0.3",
"tape": "^5.1.1"
}
}
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