Skip to content

Commit

Permalink
Merge pull request #85 from clarkie/remove-plural
Browse files Browse the repository at this point in the history
feat: remove 's' from table names
  • Loading branch information
clarkie authored Apr 15, 2017
2 parents d8e265e + ba5557d commit c616e56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ internals.loadDocClient = driver => {
};

internals.compileModel = (name, schema, log) => {
// extremly simple table names
const tableName = `${name.toLowerCase()}s`;
const tableName = name.toLowerCase();

const table = new Table(tableName, schema, serializer, internals.loadDocClient(), log);

Expand Down
2 changes: 1 addition & 1 deletion test/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('dynogels', () => {
it('should configure table name as accounts', () => {
const Account = dynogels.define('Account', { hashKey: 'id' });

Account.config().name.should.equal('accounts');
Account.config().name.should.equal('account');
});

it('should return new account item', () => {
Expand Down

0 comments on commit c616e56

Please sign in to comment.