New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-toml

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-toml

A TOML parser for JavaScript/TypeScript, targeting TOML 1.0.0 Spec

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-5.24%
Maintainers
0
Weekly downloads
 
Created
Source

js-toml

codecov github actions License: MIT npm version

A TOML parser for JavaScript and TypeScript. Fully tested and 100% compatible with the TOML v1.0.0 spec. Support Node.js, browsers and Bun⚡️!

Installation

npm install js-toml

or with yarn

yarn add js-toml

or with pnpm

pnpm add js-toml

even support bun!

bun add js-toml

Usage

import {load} from 'js-toml';

const toml = `
title = "TOML Example"

[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # First class dates
`;

const data = load(toml);
console.log(data);

API

load(toml: string): object

Parses a TOML string and returns a JavaScript object.

dump(object: object): string

Under development.

License

MIT

References

TOML v1.0.0 Official Specs

TOML GitHub Project

TOML Test

iarna-toml

Keywords

FAQs

Package last updated on 23 Nov 2024

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