@44north/blog-utilities
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

44 North

@44north/blog-utilities

A Module containing a number of small utilities to use when working with blogs.

Install

npm install @44north/blog-utilities

or

yarn add @44north/blog-utilities

generateHtmlFromJson

import { generateHtmlFromJson } from "@44north/blog-utilities";

const testJson = {
    type: "doc",
    content: [
        {
            type: "paragraph",
            content: [
                {
                    type: "text",
                    text: "Example "
                },
                {
                    type: "text",
                    marks: [
                        {
                            type: "bold"
                        }
                    ],
                    text: "Text"
                }
            ]
        }
    ]
};

console.log(generateHtmlFromJson(testJson)); // -> <p>Example <strong>Text</strong></p>

Readme

Keywords

none

Package Sidebar

Install

npm i @44north/blog-utilities

Weekly Downloads

2

Version

0.4.3

License

MIT

Unpacked Size

28.6 kB

Total Files

11

Last publish

Collaborators

  • cvachon44n