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

@iarna/toml

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iarna/toml

Better TOML parsing and stringifying all in that familiar JSON interface.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5M
increased by1.75%
Maintainers
1
Weekly downloads
 
Created

What is @iarna/toml?

The @iarna/toml package is a Node.js library used for parsing and serializing TOML (Tom's Obvious, Minimal Language) data. TOML is a configuration file format that is easy to read due to its clear semantics. This package allows users to convert TOML data into JavaScript objects and vice versa, making it useful for configuration management in Node.js applications.

What are @iarna/toml's main functionalities?

Parsing TOML strings

This feature allows the parsing of TOML formatted strings into JavaScript objects. The code sample demonstrates how to parse a simple TOML string containing a title.

const toml = require('@iarna/toml');
const tomlString = 'title = "TOML Example"';
const parsedData = toml.parse(tomlString);
console.log(parsedData);

Serializing JavaScript objects to TOML

This feature enables the serialization of JavaScript objects into TOML formatted strings. The code sample shows how to convert a JavaScript object with a title property into a TOML string.

const toml = require('@iarna/toml');
const obj = { title: 'TOML Example' };
const tomlString = toml.stringify(obj);
console.log(tomlString);

Other packages similar to @iarna/toml

Keywords

FAQs

Package last updated on 27 Jul 2018

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