Module

x/lume/deps/fff.ts>transform

🔥 Static site generator for Deno 🦕
Very Popular
Latest
variable transform
import { transform } from "https://dotland.deno.dev/x/lume@v2.4.2/deps/fff.ts";

Flavor Transform Function

Examples

Example 1

import { transform } from 'fff-flavored-frontmatter'

const fm = transform({
  date: '2022-07-18',
  lastmod: '2023-06-04',
}, [{
  created: 'date',
  updated: 'lastmod',
}])

// { created: '2022-07-18', date: '2022-07-18', lastmod: '2023-06-04', updated: '2023-06-04' }
console.log(fm)

type

<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput extends TInput = FFFFlavoredFrontmatter & TInput>(fm: TInput, presets: FFFTransformPreset[]) => TOutput