8000 GitHub - jeroen/tomleditjs: Bindings to toml-edit-js
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jeroen/tomleditjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bindings to toml-edit

Experimental bindings to a WebAssembly port of the toml_edit Rust crate.

Allows for modifying TOML data while preserving order, comments and whitespace.

Install

Installation requires no compilation:

pak::pak("jeroen/tomleditjs")

Example

The edit_toml function simply takes a TOML string and returns the modified TOML string:

# Read some TOML dadta
toml <- readLines('https://raw.githubusercontent.com/posit-dev/air/refs/heads/main/Cargo.toml')

# Modify some fields
toml <- edit_toml(toml, 'workspace.package.rust-version', '1.84')
toml <- edit_toml(toml, 'workspace.dependencies.bla', list(path = "./yolo", rev = "123"))
print(toml)

You can also parse the toml into an R list:

parse_toml(toml)

About

Bindings to toml-edit-js

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0