@ultra-lean-code/yam
v1.0.4
Published
A minimal, dependency-free YAML parser implemented in JavaScript for Node.js
Maintainers
Readme
LeanYAM - Ultra-Lean YAML Parser
A minimal, dependency-free YAML parser for Node.js. Designed to handle common configuration files and data structures without the complexity and overhead of a full YAML 1.2 implementation.
Installation
npm install @ultra-lean-code/yamUsage
import LeanYam from '@ultra-lean-code/yam';
const yaml = `
name: My App
version: 1.0
features: [fast, reliable]
config: {debug: true, port: 8080}
`;
const result = LeanYam.parse(yaml);
console.log(result);What's Supported
- Scalars:
null,true/false, numbers, strings - Maps:
{key: value}or indented block style - Arrays:
[item1, item2]or dash-aligned - Comments with
# - Multi-line strings
- Deep nesting
- Mixed styles
What's Not Supported
- Anchors/aliases (
&,*) - Tags (
!,!!) - Document markers (
---,...) - Single-quoted strings
- Block scalars (
|,>)
Note: yes/no/on/off are treated as strings, not booleans. Use true/false instead.
Testing
node tests/test.jsLicense
MIT
