* Convert frontmatter object using mapping to internal task data. * User-defined fields (settings.userFields) are written as top-level properties * on the returned object, keyed by their frontmatter key (e.g. "start_date").
( frontmatter: unknown, filePath: string, storeTitleInFilename?: boolean )
| 61 | * on the returned object, keyed by their frontmatter key (e.g. "start_date"). |
| 62 | */ |
| 63 | mapFromFrontmatter( |
| 64 | frontmatter: unknown, |
| 65 | filePath: string, |
| 66 | storeTitleInFilename?: boolean |
| 67 | ): Partial<TaskInfo> { |
| 68 | const frontmatterRecord = |
| 69 | frontmatter !== null && typeof frontmatter === "object" && !Array.isArray(frontmatter) |
| 70 | ? (frontmatter as Record<string, unknown>) |
| 71 | : undefined; |
| 72 | return mapTaskFromFrontmatter( |
| 73 | this.mapping, |
| 74 | frontmatterRecord, |
| 75 | filePath, |
| 76 | storeTitleInFilename, |
| 77 | this.userFields, |
| 78 | this.statuses, |
| 79 | this.priorities |
| 80 | ); |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Convert internal task data to frontmatter using mapping. |
no outgoing calls
no test coverage detected