Socket
Socket
Sign inDemoInstall

tap-yaml

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-yaml - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

11

lib/types/function.js

@@ -8,5 +8,8 @@ const { Type } = require('yaml/dist/cst/Node.js')

resolve: (doc, cst) => {
const src = cst.strValue
const f = function parsedYamlFunction () {}
f.toString = () => src
const src = cst.strValue.split('\n')
const name = JSON.parse(src.shift())
const code = src.join('\n')
const f = function () {}
Object.defineProperty(f, 'name', { value: name, enumerable: false })
f.toString = () => code
return f

@@ -16,3 +19,3 @@ },

stringify ({ comment, type, value }, ctx, onComment, onChompKeep) {
value = value.toString()
value = JSON.stringify(value.name) + '\n' + value.toString()
// better to just always put functions on a new line.

@@ -19,0 +22,0 @@ type = type || module.exports.options.defaultType

{
"name": "tap-yaml",
"version": "0.1.0",
"version": "0.2.0",
"description": "Yaml handling for TAP parsers and generators",

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

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