1.2.1 • Published 1 year ago

fff-flavored-frontmatter v1.2.1

Weekly downloads
-
License
WTFPL
Repository
github
Last release
1 year ago

FFF Flavored Frontmatter

npm minified size downloads deno.land

🌟 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

1 year ago

1.2.0

2 years ago

1.2.0-alpha.1

2 years ago

1.2.0-alpha.0

2 years ago

1.1.0

2 years ago

1.1.0-alpha.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.4.0-alpha.0

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.3.0-alpha.0

3 years ago

0.3.0-alpha.1

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago