Commit Graph

6 Commits

Author SHA1 Message Date
Tom Wanzek
f2b2aeb303 Added missing exports for format and compile functions to support custom named formats (#9364)
* Added exports for functions format(name: string, fmt: string | Function): Function and compile(format: string): Function to morgan namespace. These fnctions are exported in the morgan js module and can be used in conjunction with the token function to create named custom formats. Inncluded tests.

* Added interface definitions to clarify the signatures of callback function used in defining custom tokens (TokenCallbackFn) with morgan.token(...). Added interface definitions to clarify signatures of custom format functions returned by morgan.compile(...) and used as arguments to morgan.format(...) and morgan(...). Added interface Morgan to clarify return type of morgan.token(...), morgan.compile(...) and morgan.format(...). For a detailed discussion of the rationale of there changes see comments in pull request #9364. Updated tests.

Updated version reference to morgan 1.7.0.
2016-05-24 23:23:55 +09:00
vvakame
7de6c3dd94 Merge branch 'master' into rename-repo-url 2016-03-17 21:06:54 +09:00
vvakame
14fe4313f4 replace internal module to namespace 2016-03-17 02:18:10 +09:00
vvakame
56295f5058 replace https://github.com/borisyankov/DefinitelyTyped to https://github.com/DefinitelyTyped/DefinitelyTyped 2016-03-17 00:55:26 +09:00
Yaojian
4566a913a3 fixes #7469 uncaughtException: stream.write is not a function 2016-01-04 12:13:39 +08:00
James Roland Cabresos
64795f2f0f Added morgan definitions 2014-08-03 04:47:28 +08:00