
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@node-steam/vdf
Advanced tools
VDF is a module to convert Valve's KeyValue format to JSON and back using Typescript.
Heavily inspired by simple-vdf
(
< v2.0.0
can be used as a drop-in replacement)
You can install VDF through the command line by using the following command:
yarn add @node-steam/vdf
import * as VDF from '@node-steam/vdf';
// or
import {
parse,
stringify,
} from '@node-steam/vdf';
VDF.parse(text: string)
Parse a VDF string into a JSON object
const string = `
"string" "string"
"false" "false"
"true" "true"
"number" "1234"
"float" "12.34"
"null" "null"
"undefined" "undefined"
"nested"
{
"string" "string"
"deep"
{
"string" "string"
}
}
`;
const object = VDF.parse(string);
// or
const object = 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
const object = {
string: 'string',
false: false,
true: true,
number: 1234,
float: 12.34,
null: null,
undefined: undefined,
nested: {
string: 'string',
deep: {
string: 'string',
},
},
};
const string = VDF.stringify(object);
// or
const string = stringify(object);
> `
"string" "string"
"false" "false"
"true" "true"
"number" "1234"
"float" "12.34"
"null" "null"
"undefined" "undefined"
"nested"
{
"string" "string"
"deep"
{
"string" "string"
}
}
`;
booleans
, numbers
, null
and undefined
(>= v2.0.0
)Interested in contributing to VDF? Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.
Installing dependencies:
yarn
Compile:
yarn compile
Test:
yarn test
Generate Docs:
yarn docs
This module is thoroughly tested with ava
FAQs
Module to convert Valve's KeyValue format to JSON and back
The npm package @node-steam/vdf receives a total of 1,220 weekly downloads. As such, @node-steam/vdf popularity was classified as popular.
We found that @node-steam/vdf demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.