9.1.2 • Published 3 years ago

@enkidevs/curriculum-helpers v9.1.2

Weekly downloads
616
License
MIT
Repository
github
Last release
3 years ago

Enki Curriculum Helpers

Helpers for parsing/transforming/compiling Enki Curriculum from and to different formats.

See Enki curriculum processors for more details.

const { contentTypes, compactAst } = require("@enkidevs/curriculum-helpers")
const { getParser } = require("@enkidevs/curriculum-parser")
console.log(
  JSON.stringify(
    compactAst(
      getParser(contentTypes.INSIGHT).parseSync(`---
author: enki
---

# This is an \`example\`
`)
    ),
    null,
    2
  )
)

Logs

{
  "type": "root",
  "children": [
    {
      "type": "yaml",
      "value": "author: enki",
      "data": {
        "parsedValue": {
          "author": "enki"
        }
      }
    },
    {
      "type": "headline",
      "children": [
        {
          "type": "text",
          "value": "This is an "
        },
        {
          "type": "inlineCode",
          "value": "example"
        }
      ]
    }
  ]
}
9.1.2

3 years ago

9.1.0

3 years ago

9.0.2

3 years ago

9.0.1

4 years ago

9.0.0

4 years ago

8.0.0

4 years ago

7.1.0

4 years ago

7.0.1

4 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.0

4 years ago

4.0.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

1.6.0

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago