Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

node-steam/vdf

Repository files navigation

ChatTravis CIDependenciesVersionDownloadsLicenseRunkit

npm statistics

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

Heavily inspired bysimple-vdf

(< v2.0.0 can be used as a drop-in replacement)

Differences

Installation

You can installVDF through the command line by using the following command:

yarn add @node-steam/vdf

Usage:

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

Documentation:

Generated Documentation

VDF.parse(text: string)

Parse a VDF string into a JSON object

conststring=`"string"          "string""false"           "false""true"            "true""number"          "1234""float"           "12.34""null"            "null""undefined"       "undefined""nested"{    "string"      "string"    "deep"    {        "string"  "string"    }}`;constobject=VDF.parse(string);// orconstobject=parse(string);>{string:'string',false:false,true:true,number:1234,float:12.34,null:null,undefined:undefined,nested:{string:'string',deep:{string:'string',},},};

VDF.stringify(object: object)

Parse a JSON object into a VDF string

constobject={string:'string',false:false,true:true,number:1234,float:12.34,null:null,undefined:undefined,nested:{string:'string',deep:{string:'string',},},};conststring=VDF.stringify(object);// orconststring=stringify(object);>`"string"          "string""false"           "false""true"            "true""number"          "1234""float"           "12.34""null"            "null""undefined"       "undefined""nested"{    "string"      "string"    "deep"    {        "string"  "string"    }}`;

Differences fromsimple-vdf

Contributors

Contributing:

Interested in contributing toVDF? Contributions are welcome, and are accepted via pull requests. Pleasereview 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 withava

License:

Code licensed underMIT, documentation underCC BY 3.0.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp