
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@travetto/yaml
Advanced tools
Install: @travetto/yaml
npm install @travetto/yaml
# or
yarn add @travetto/yaml
In the desire to provide a minimal footprint, the framework provides a minimal YAML parser/serializer to handle standard configuration structure.
YamlUtil is the main access point for this module, and will expose two method, parse
and serialize
.
Code: Simple YAML Parsing
import { YamlUtil } from '@travetto/yaml';
export function main(): void {
const obj = YamlUtil.parse(`
name: Source
age: 20
fields:
sub:
- a
- b
- c
sub2: [1,2,3]
sub3: {"k":5, "v":20}
`);
console.log(JSON.stringify(obj, null, 2));
}
Terminal: Simple YAML Parsing
$ trv main doc/parse.ts
{
"name": "Source",
"age": 20,
"fields": {
"sub": [
"a",
"b",
"c"
],
"sub2": [
1,
2,
3
],
"sub3": {
"k": 5,
"v": 20
}
}
}
Code: Simple YAML Serialization
import { YamlUtil } from '@travetto/yaml';
export function main(): void {
const text = YamlUtil.serialize({
name: 'Source',
age: 20,
fields: {
sub: [
'a',
'b',
'c'
],
sub2: [1, 2, 3],
sub3: { k: 5, v: 20 }
}
});
console.log(text);
}
Terminal: Simple YAML Serialization
$ trv main doc/serialize.ts
name: Source
age: 20
fields:
sub:
- a
- b
- c
sub2:
- 1
- 2
- 3
sub3:
k: 5
v: 20
FAQs
Simple YAML support, provides only clean subset of yaml
The npm package @travetto/yaml receives a total of 37 weekly downloads. As such, @travetto/yaml popularity was classified as not popular.
We found that @travetto/yaml demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
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.