simple mongoose schema parser
npm install @zcong/mongoose-schema-parser   
> simple mongoose schema parser
``bash`
$ yarn add @zcong/mongoose-schema-parser
`ts
import { parseSchema } from '@zcong/mongoose-schema-parser'
const testSchema = new Schema({
id: ObjectId,
name: String,
age: {
type: Number
}
})
console.log(parseSchema(testSchema))
// {
// id: {
// type: {
// type: TypeEnum.ObjectId,
// isArray: false
// }
// },
// name: {
// type: {
// type: TypeEnum.String,
// isArray: false
// }
// },
// age: {
// type: {
// type: TypeEnum.Number,
// isArray: false
// },
// details: {}
// }
// }
``
MIT © zcong1993