
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Use TOML to construct object literals directly in JavaScript
const toml = require('qtoml')
let obj = toml`
[example]
key1 = ${5 + 8}
key2 = 17
[elpmaxe]
1yek = 31`
console.log(obj) // {example: {key1: 13, key2: 17}, elpmaxe: {1yek: 31}}
This module provides a tagged template string for contructing objects using TOML.
The provided string must be valid TOML or an error will be thrown. Embedded expressions are evaluted and included and can evaluate to any datatype that can be used in TOML. For example, the following is valid:
obj = toml`a = ${new Date()}` // equivalent of {a: new Date()}
Only values that can be represented as TOML are allowed. Trying to include other values will throw. For example, a single-type array is fine:
let value = [1, 2, 3]
obj = toml`a = ${value}` // {a: [1, 2, 3]}
But a mixed-type array is not:
let value = ['a', 'b', 1, 2]
obj = toml`a = ${value}` // throws
FAQs
Use TOML to construct object literals directly in JavaScript
We found that qtoml 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.