### Hierarchy

- EventEmitter
  - Mustr

### Implements

- IMustr

## Index

### Constructors

- constructor

### Properties

- cwd
- log
- options
- outputPath
- registerPath
- templates
- templatesGlob
- templatesPath
- defaultMaxListeners

### Methods

- addListener
- configure
- emit
- eventNames
- getMaxListeners
- hasMatter
- hasTemplate
- init
- inject
- listenerCount
- listeners
- load
- normalize
- normalizedExt
- on
- once
- prependListener
- prependOnceListener
- register
- removeAllListeners
- removeListener
- render
- setMaxListeners
- transformCase
- truncate
- tryRequire
- listenerCount

## Constructors

### constructor

- new Mustr(options?: IMustrOptions): Mustr

- - Defined in index.ts:54

  #### Parameters

  - ##### Optional options: IMustrOptions

  #### Returns Mustr

## Properties

### cwd

cwd: string = process.cwd()

Implementation of IMustr.cwd

- Defined in index.ts:39

### log

log: ILogger

Implementation of IMustr.log

- Defined in index.ts:40

### options

options: IMustrOptions

Implementation of IMustr.options

- Defined in index.ts:54

### outputPath

outputPath: string

Implementation of IMustr.outputPath

- Defined in index.ts:45

### registerPath

registerPath: string

Implementation of IMustr.registerPath

- Defined in index.ts:43

### templates

templates: ITemplates

Implementation of IMustr.templates

- Defined in index.ts:51

### templatesGlob

templatesGlob: string[]

Implementation of IMustr.templatesGlob

- Defined in index.ts:48

### templatesPath

templatesPath: string

Implementation of IMustr.templatesPath

- Defined in index.ts:44

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:603

## Methods

### addListener

- addListener(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.addListener

  Overrides EventEmitter.addListener

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:605

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### configure

- configure(name: string, output?: string | IMetadata, metadata?: IMetadata): ITemplate

- Implementation of IMustr.configure

  - Defined in index.ts:292

  Configure Configures template for output.

  #### Parameters

  - ##### name: string

    the name of the template to load.

  - ##### Optional output: string | IMetadata

    the output name/path to use when rendering.

  - ##### Optional metadata: IMetadata

  #### Returns ITemplate

### emit

- emit(event: string | symbol, ...args: any[]): boolean

- Inherited from EventEmitter.emit

  Overrides EventEmitter.emit

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:615

  #### Parameters

  - ##### event: string | symbol

  - ##### Rest ...args: any[]

  #### Returns boolean

### eventNames

- eventNames(): (string | symbol)[]

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:616

  #### Returns ( string | symbol ) []

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:613

  #### Returns number

### Private hasMatter

- hasMatter(str: any): boolean

- - Defined in index.ts:83

  Has Matter Tests if string contains front matter.

  #### Parameters

  - ##### str: any

    the string to inspect.

  #### Returns boolean

### Private hasTemplate

- hasTemplate(str: any): boolean

- - Defined in index.ts:93

  Has Template Loosly check if string contains template chars.

  #### Parameters

  - ##### str: any

    the string to inspect.

  #### Returns boolean

### init

- init(force?: boolean): void

- Implementation of IMustr.init

  - Defined in index.ts:238

  Init Initializes Mustr for current project

  #### Parameters

  - ##### Optional force: boolean

    when true forces init.

  #### Returns void

### inject

- inject(filename: string | IInject, find?: string | RegExp | NodeCallback, strategy?: "before" | "after" | "first" | "last" | "replace", insert?: string | string[], done?: NodeCallback): void

- - Defined in index.ts:658

  Inject Creates a file stream reading chunks until match. Upon match the provided value is injected. NOTE: lines are auto updated with the correct line ending for returns.

  #### Parameters

  - ##### filename: string | IInject

    the file name to inject into.

  - ##### Optional find: string | RegExp | NodeCallback

    the string or expression to match.

  - ##### Optional strategy: "before" | "after" | "first" | "last" | "replace"

    insert on before, after, replace, first or last when matched.

  - ##### Optional insert: string | string[]

    the value or callback for injecting upon match.

  - ##### Optional done: NodeCallback

    the callback on file written.

  #### Returns void

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:617

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:614

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### load

- load(): IMustr

- Implementation of IMustr.load

  - Defined in index.ts:261

  Load Loads the template paths and config.

  #### Returns IMustr

### Private normalize

- normalize(template: string): ITemplate

- - Defined in index.ts:130

  Normalize Parses/normalizes a template name, path or static template string. When passing a name it searches loaded template paths and matches the filename to the template name passed.

  #### Parameters

  - ##### template: string

    the template name, path or static template string.

  #### Returns ITemplate

### Private normalizedExt

- normalizedExt(ext: any): string

- - Defined in index.ts:118

  Normalize Extension Ensures extension begins with "."

  #### Parameters

  - ##### ext: any

    the extension to be normalized.

  #### Returns string

### on

- on(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.on

  Overrides EventEmitter.on

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:606

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### once

- once(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.once

  Overrides EventEmitter.once

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:607

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### prependListener

- prependListener(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.prependListener

  Overrides EventEmitter.prependListener

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:608

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### prependOnceListener

- prependOnceListener(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.prependOnceListener

  Overrides EventEmitter.prependOnceListener

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:609

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### register

- register(name: string | IRegisterOptions, template?: string): IRegister

- Implementation of IMustr.register

  - Defined in index.ts:404

  Register Registers a template with Mustr.

  #### Parameters

  - ##### name: string | IRegisterOptions

    to use when registering a template.

  - ##### Optional template: string

    the template name or path to lookup or a static string.

  #### Returns IRegister

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:611

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: string | symbol, listener: Function): this

- Inherited from EventEmitter.removeListener

  Overrides EventEmitter.removeListener

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:610

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: Function

  #### Returns this

### render

- render(name: string | ITemplate, output?: string | IMetadata | NodeCallback, metadata?: IMetadata | NodeCallback, done?: NodeCallback): void

- Implementation of IMustr.render

  - Defined in index.ts:513

  Render Renders the requested template.

  #### Parameters

  - ##### name: string | ITemplate

    the name of the template to render.

  - ##### Optional output: string | IMetadata | NodeCallback

    the output path/name to render the template as.

  - ##### Optional metadata: IMetadata | NodeCallback

  - ##### Optional done: NodeCallback

  #### Returns void

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:612

  #### Parameters

  - ##### n: number

  #### Returns this

### transformCase

- transformCase(str: string, to: string): string

- Implementation of IMustr.transformCase

  - Defined in index.ts:821

  Transform To Transforms a string to the desired casing.

  #### Parameters

  - ##### str: string

    the string to be transformed.

  - ##### to: string

    the casing to be transformed to using lodash.

  #### Returns string

### Private truncate

- truncate(str: any, max: any): any

- - Defined in index.ts:228

  Truncate Nothing special, cheesy truncation...move along.

  #### Parameters

  - ##### str: any

    the string to be truncated.

  - ##### max: any

    the max len before truncating.

  #### Returns any

### Private tryRequire

- tryRequire(path: string): any

- - Defined in index.ts:103

  Try Require Tries to require a module logging error if failed.

  #### Parameters

  - ##### path: string

    the module path to be required.

  #### Returns any

### Static listenerCount

- listenerCount(emitter: EventEmitter, event: string | symbol): number

- Inherited from EventEmitter.listenerCount

  - Defined in /Users/Carey/Documents/Projects/mustr/node_modules/@types/node/index.d.ts:602

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc