1.2.1 ā¢ Published 4 months ago
fff-flavored-frontmatter v1.2.1
FFF Flavored Frontmatter
š Type definition of the FFF Flavored Frontmatter.
Installation
pls confirm the version you need before installing, or always keep the latest version.
pnpm add fff-flavored-frontmatter # pnpm
# yarn add fff-flavored-frontmatter # yarn
# npm i fff-flavored-frontmatter # npm
Usage
Types
// Node
import type { FFFFlavoredFrontmatter } from 'fff-flavored-frontmatter'
// import type { FFFBase, FFFExtra } from 'fff-flavored-frontmatter'
// import type { FFFImage, FFFAudio, FFFVideo, FFFAuthor } from 'fff-flavored-frontmatter'
// Deno
// import type { FFFFlavoredFrontmatter } from 'https://deno.land/x/fff/mod.ts'
Utils
import { type FFFTransformPreset, transform } from 'fff-flavored-frontmatter'
const preset: FFFTransformPreset = {
created: 'date',
flags: ({ draft }) => (draft ? ['draft'] : []),
}
const fm = transform({
date: '2023-02-23',
draft: true,
}, [preset])
// {
// date: '2023-02-23',
// created: '2023-02-23',
// draft: true,
// flags: ['draft']
// }
console.log(fm)
Go to References to see the list of utilities.
1.2.1
4 months ago
1.2.0
5 months ago
1.2.0-alpha.1
5 months ago
1.2.0-alpha.0
5 months ago
1.1.0
9 months ago
1.1.0-alpha.0
10 months ago
1.0.1
12 months ago
1.0.0
12 months ago
1.0.0-alpha.1
12 months ago
1.0.0-alpha.0
12 months ago
0.5.3
1 year ago
0.5.2
1 year ago
0.5.1
1 year ago
0.4.0-alpha.0
2 years ago
0.5.0
1 year ago
0.4.1
2 years ago
0.4.0
2 years ago
0.4.2
1 year ago
0.3.0
2 years ago
0.3.0-alpha.0
2 years ago
0.3.0-alpha.1
2 years ago
0.2.2
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago