smartfm/dist/index.d.ts
2016-11-13 23:11:49 +01:00

28 lines
686 B
TypeScript

import 'typings-global';
export interface IParsedFM {
data: any;
content: string;
orig: string;
}
/**
* class smartfm handles frontmatter
*/
export declare class Smartfm {
/**
* add frontmatter to a string
*/
stringify(bodyString: string, frontmatterData: any): void;
/**
* parse a string that has frontmatter attached, YAML notation
*/
parse(stringToParse: string): IParsedFM;
}
/**
* parse a string that has frontmatter attached, YAML notation
*/
export declare let parse: (stringToParse: string) => IParsedFM;
/**
* add frontmatter to a string
*/
export declare let stringify: (bodyString: string, frontmatterData: any) => void;