yaml-json-toml-loader
SolidGenerate multi-format configuration file loaders for YAML, JSON, and TOML formats.
Data & Documents 1,160 stars
71 forks Updated today MIT
Install
Quality Score: 94/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# YAML/JSON/TOML Loader
Generate multi-format config file loaders.
## Generated Patterns
```typescript
import fs from 'fs';
import path from 'path';
import yaml from 'yaml';
import toml from '@iarna/toml';
type ConfigFormat = 'json' | 'yaml' | 'toml' | 'auto';
export function loadConfigFile(filepath: string, format: ConfigFormat = 'auto'): unknown {
const content = fs.readFileSync(filepath, 'utf-8');
const ext = format === 'auto' ? path.extname(filepath).toLowerCase() : `.${format}`;
switch (ext) {
case '.json': return JSON.parse(content);
case '.yaml': case '.yml': return yaml.parse(content);
case '.toml': return toml.parse(content);
default: throw new Error(`Unknown config format: ${ext}`);
}
}
export function saveConfigFile(filepath: string, data: unknown, format: ConfigFormat = 'auto'): void {
const ext = format === 'auto' ? path.extname(filepath).toLowerCase() : `.${format}`;
let content: string;
switch (ext) {
case '.json': content = JSON.stringify(data, null, 2); break;
case '.yaml': case '.yml': content = yaml.stringify(data); break;
case '.toml': content = toml.stringify(data as any); break;
default: throw new Error(`Unknown format: ${ext}`);
}
fs.writeFileSync(filepath, content);
}
```
## Target Processes
- configuration-management-system
- cli-application-bootstrap
Details
- Author
- a5c-ai
- Repository
- a5c-ai/babysitter
- Created
- 4 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
cosmiconfig-setup
Set up cosmiconfig for hierarchical configuration loading from multiple sources and formats.
1,160 Updated today
a5c-ai Data & Documents Listed
data-processing
Process JSON with jq and YAML/TOML with yq. Filter, transform, query structured data efficiently. Triggers on: parse JSON, extract from YAML, query config, Docker Compose, K8s manifests, GitHub Actions workflows, package.json, filter data.
335 Updated today
aiskillstore AI & Automation Solid
config-schema-validator
Generate Zod/JSON Schema configuration validators with defaults and error messages.
1,160 Updated today
a5c-ai AI & Automation Solid
configuration-migrator
Migrate configuration files between formats and versions with environment variable extraction
1,160 Updated today
a5c-ai AI & Automation Solid
config-migration-generator
Generate configuration file migration utilities for version upgrades.
1,160 Updated today
a5c-ai