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

@node-steam/vdf

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-steam/vdf - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

25

example/runkit.js
const vdf = require('@node-steam/vdf');
const object = {
description: 'This is a example object!',
boolean: true,
number: 529,
};
const string =
`"string" "string"
"false" "false"
"true" "true"
"number" "1234"
"float" "12.34"
"null" "null"
"undefined" "undefined"
"nested"
{
"string" "string"
"deep"
{
"string" "string"
}
}`;
const x = vdf.stringify(object, true);
return x;
vdf.parse(string);

@@ -75,5 +75,6 @@ "use strict";

}
return dump(object, 0);
return create(object);
};
var dump = function (object, level) {
var create = function (object, level) {
if (level === void 0) { level = 0; }
if (typeof object !== 'object') {

@@ -90,3 +91,3 @@ throw new TypeError('VDF | Stringify: A key has value of type other than string or object');

if (typeof object[key] === 'object' && object[key] !== null) {
result += [indent, '"', key, '"\n', indent, '{\n', dump(object[key], level + 1), indent, '}\n'].join('');
result += [indent, '"', key, '"\n', indent, '{\n', create(object[key], level + 1), indent, '}\n'].join('');
}

@@ -93,0 +94,0 @@ else {

{
"name": "@node-steam/vdf",
"version": "2.0.0",
"version": "2.0.1",
"description": "Module to convert Valve's KeyValue format to JSON and back",

@@ -67,7 +67,4 @@ "main": "lib/index.js",

"babel-register": "^6.26.0",
"eslint": "^4.12.0",
"eslint-config-google": "^0.9.1",
"typescript": "^2.6.1",
"typescript-eslint-parser": "^9.0.0"
"typescript": "^2.6.1"
}
}

@@ -15,3 +15,5 @@ [![Chat](https://img.shields.io/gitter/room/node-steam/vdf.svg?style=flat-square)](https://gitter.im/node-steam/vdf)

>
> (`<= v2.0.0` can be used as a drop-in replacement)
> (`< v2.0.0` can be used as a drop-in replacement)
>
> [Differences](#differences-from-simple-vdf)

@@ -18,0 +20,0 @@ ## Installation

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