Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-novel-info

bluelovers458ISC3.0.18TypeScript support: included

mdconf module for node-novel

config, info, json, markdown, md, mdconf, mdconfig, node-novel, novel, parse, stringify, txt

readme

node-novel-info

mdconf module for node-novel

npm install node-novel-info

demo

README.md

const novelInfo = require('node-novel-info');
import * as novelInfo from 'node-novel-info';
import novelInfo from 'node-novel-info';

mdconf_parse

fs.readFile('./test/res/README.md')
    .then(function (buf)
    {
        return novelInfo.parse(buf, {
            //chk: false
        });
    })
    .then(function (conf)
    {
        console.log(conf);

        return conf;
    })
;

output

{ novel: 
   { title: '自卫队三部曲',
     author: '有川浩',
     source: 'http://www.wenku8.com/modules/article/reader.php?aid=350',
     publisher: '富士见文库',
     cover: 'http://img.wenku8.com/image/0/350/350s.jpg',
     date: '2011-06-22T00:00:00+08:00',
     status: '已完成',
     preface: '故事背景架构在近未来(或可称为平行世界)的曰本。\n某天,直径五百公尺的白色陨石状物体以迅雷不及掩耳之势坠落在地球上。\n同一时间,发生了人类变化成盐柱的诡异现象(一般称之为“盐害”),光是曰本地区的死亡人数便估计多达八千万人。文明社会在一瞬间崩溃,劫后余生的人们逃到农村,过着自给自足的贫乏生活……',
     tags: [ 'node-novel', 'wenku8' ] },
  options: { textlayout: { allow_lf2: 'true' } } }

Mdconf.stringify

var moment = require("moment");
console.log(novelInfo.stringify({
    novel: {
        test: true,
    },

    options: {

        textlayout: {
            lf: true,
        },

        data: moment(),

    }
}));

output

#novel

- test: true

#options

- data: 2018-02-04T02:48:24+08:00

##textlayout

- lf: true

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.0.18 (2024-02-03)

🔖 Miscellaneous

3.0.17 (2024-01-29)

🔖 Miscellaneous

3.0.16 (2022-11-04)

📌 Dependencies

3.0.15 (2022-05-16)

🛠 Build System

♻️ Chores

🔖 Miscellaneous

3.0.14 (2021-07-08)

🛠 Build System

  • update deps and use tslib (bc00796)

3.0.13 (2021-02-12)

📦 Code Refactoring

  • deps: update is-plain-object (48ead67)

🛠 Build System

3.0.12 (2021-02-12)

♻️ Chores

3.0.11 (2020-08-13)

♻️ Chores

3.0.10 (2020-07-19)

🛠 Build System

♻️ Chores

3.0.9 (2020-06-30)

🐛 Bug Fixes

3.0.8 (2020-06-30)

♻️ Chores

3.0.7 (2020-06-20)

🔖 Miscellaneous

3.0.6 (2020-06-20)

📦 Code Refactoring

  • update typescript and avoid bug of typescript (9473fd1)

♻️ Chores

3.0.5 (2020-06-09)

Note: Version bump only for package node-novel-info

3.0.4 (2020-06-09)

Note: Version bump only for package node-novel-info

3.0.3 (2020-06-08)

Note: Version bump only for package node-novel-info

3.0.2 (2020-06-05)

Features