A tool for finding and managing variables in Markdown files.
npm i var-finder-md
---
var1: Example
var2: 150
---
[
{
var1: 'Example',
var2: 150,
},
]
const varFinder = require('var-finder-md')
console.log(varFinder('./<FOLDER_PATH>}'))
📁Project
├───📁docs
│ ├───📁Sections
│ │ Start.md
│ │ Usage.md
│ ├───📁Subsections
│ │ Start_1.md
│ │ Start_2.md
│ │ Usage_2.md
│ │ Usage_2.md
├───package-lock.json
├───package.json
├───script.js
const varFinder = require('var-finder-md')
sectionFiles = varFinder('./docs/Sections')
subsectionFiles = varFinder('./docs/Subsections')
console.log(sectionFiles)
console.log(subsectionFiles)
[
{
filename: 'Start',
variables: { title: 'Start', navbar_position: 0 }
},
{
filename: 'Usage',
variables: { title: 'Usage', navbar_position: 0 }
}
]
[
{
filename: 'Start_1',
variables: { title: 'Windows', navbar_position: 0 }
},
{
filename: 'Start_2',
variables: { title: 'Linux', navbar_position: 0 }
},
{
filename: 'Usage_1',
variables: { title: 'React', navbar_position: 0 }
},
{
filename: 'Usage_2',
variables: { title: 'Vue', navbar_position: 0 }
}
]