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

Module to convert Valve's KeyValue format to JSON and back

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-10.03%
Maintainers
1
Weekly downloads
 
Created
Source

Chat Travis CI Dependencies Version Downloads License Runkit

npm statistics

VDF is a module to convert Valve's KeyValue format to JSON and back using Typescript.

Installation

You can install VDF through the command line by using the following command:

yarn add @node-steam/vdf

Usage:

import * as VDF from '@node-steam/vdf';

// or

import {
    parse,
    stringify,
} from '@node-steam/vdf';

Documentation:

Generated Documentation

VDF.parse(text: string)

Parse a VDF string into a JSON object

const string = `
"description"   "This is a example VDF object!"
"boolean"       "true"
"number"        "529"
`;

const object = VDF.parse(string);

// or

const object = parse(string);

> {
    description: 'This is a example VDF object!',
    boolean: 'true',
    number: '529',
};
VDF.stringify(object: object)

Parse a JSON object into a VDF string

const object = {
    description: 'This is a example VDF object!',
    boolean: true,
    number: 529,
};

const string = VDF.stringify(object);

// or

const string = stringify(object);

> `
"description"   "This is a example VDF object!"
"boolean"       "true"
"number"        "529"
`;

Contributors

  • Silas Rech aka. lenovouser

Contributing:

Interested in contributing to VDF? Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.

Help:

Installing dependencies:

yarn

Compile:

yarn compile

Test:

yarn test

Generate Docs:

yarn docs

Tests:

This module is thoroughly tested with ava

License:

Code licensed under MIT, documentation under CC BY 3.0.

Keywords

FAQs

Package last updated on 27 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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