dbml-parser is an attempt to create an agnostic standalone parser compatible with DBML - Database Markup Language .
This a pretty much a work in progress and not all feature of dbdiagram.io are supported --- yet ;)
After you read the instructutions you can play around with the sintax. Here
$ npm install --save nerdify/dsl-dbscheme
Importing
import {parse} from 'dsl-dbscheme'
Now you can use the parse function to start parsing db schemas.
const result = parse(schema);