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

yaml-loader

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-loader - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

10

index.js

@@ -5,4 +5,10 @@ var yaml = require('js-yaml');

this.cacheable && this.cacheable();
var res = yaml.safeLoad(source);
return JSON.stringify(res, undefined, '\t');
try {
var res = yaml.safeLoad(source);
return JSON.stringify(res, undefined, '\t');
}
catch (err) {
this.emitError(err);
return null;
}
};

2

package.json
{
"name": "yaml-loader",
"version": "0.4.0",
"version": "0.5.0",
"description": "YAML loader for webpack (converts YAML to JSON)",

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

@@ -16,3 +16,3 @@ # yaml-loader for webpack

``` javascript
var json = require("json!yaml!./file.yml");
var json = require("json-loader!yaml-loader!./file.yml");
// => returns file.yml as javascript object

@@ -39,3 +39,3 @@ ```

```js
// applicatin.js
// application.js
const actualFilename = require(`file?name=[name].json!./../data/${file}.yaml`);

@@ -42,0 +42,0 @@ window.fetch(actualFilename).then(res => {

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