diff --git a/example/ModelHookPlugin.ts b/example/ModelHookPlugin.ts index 0d93de1..c610ff6 100644 --- a/example/ModelHookPlugin.ts +++ b/example/ModelHookPlugin.ts @@ -1,9 +1,9 @@ import Iridium = require("../iridium"); -export = LowercaseCollectionsPlugin; - class LowercaseCollectionsPlugin implements Iridium.Plugin { newModel(model: Iridium.Model) { model.collectionName = model.collectionName.toLowerCase(); } -} \ No newline at end of file +} + +export = LowercaseCollectionsPlugin; \ No newline at end of file diff --git a/example/ValidationPlugin.ts b/example/ValidationPlugin.ts index e66ad5c..dec0028 100644 --- a/example/ValidationPlugin.ts +++ b/example/ValidationPlugin.ts @@ -1,11 +1,11 @@ import Iridium = require("../iridium"); import Skmatc = require("skmatc"); -export = StringCaseValidationPlugin; - class StringCaseValidationPlugin implements Iridium.Plugin { validate = [ Skmatc.create((schema) => schema === "Lowercase", function (schema, data, path) { return this.assert(data.toLowerCase() == data) }), Skmatc.create((schema) => schema === "Uppercase", function (schema, data, path) { return this.assert(data.toUpperCase() == data) }) ]; } + +export = StringCaseValidationPlugin; \ No newline at end of file