data-collector
Extract data from yaml, json, xml files.
Install
npm install --save-dev @yama-dev/data-collector
Use
make data file.
ls
# /project-root/
# └─ data
# ├── 20200101.yaml # yaml
# ├── 20200201.json # json
# └── 20200301.xml # xml
import dataCollector from '@yama-dev/data-collector';
let options = {
data: 'data', // Directory where data is stored.
order: 'DESC', // Sort. DESC or ASC
orderby: 'date', // Sort. property-name.
};
dataCollector(options);