Skip to content

Commit

Permalink
Merged in documentation and plugin changes
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Apr 21, 2015
1 parent 5607eea commit a728fe0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Iridium.njsproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Content Include="README.md" />
<Compile Include="index.ts" />
<Compile Include="benchmarks\mongodb.js" />
<Compile Include="example\LowercaseCollectionsPlugin.js" />
<Compile Include="example\LowercaseCollectionsPlugin.ts" />
<Compile Include="example\StringCaseValidationPlugin.js" />
<Compile Include="example\UserModel.js" />
<TypeScriptCompile Include="example\IntelliSense.ts" />
Expand Down
9 changes: 0 additions & 9 deletions example/LowercaseCollectionsPlugin.js

This file was deleted.

11 changes: 11 additions & 0 deletions example/LowercaseCollectionsPlugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Iridium = require('../index');
import Model = require('../lib/Model');
import IPlugin = require("../lib/Plugins");

export = LowercaseCollectionsPlugin;

class LowercaseCollectionsPlugin implements IPlugin {
newModel(model: Model.IModel<any, any>) {
model.collectionName = model.collectionName.toLowerCase();
}
}
2 changes: 1 addition & 1 deletion lib/Model.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export = IPlugin;
interface IPlugin {
newModel?(model: model.IModel<any, any>);
newInstance? (instance: any, model: model.IModelBase);
validate? : SkmatcCore.IValidationHandler | [SkmatcCore.IValidationHandler];
validate? : SkmatcCore.IValidationHandler | SkmatcCore.IValidationHandler[];
}

0 comments on commit a728fe0

Please sign in to comment.