Skip to content

Conversation

@profuel
Copy link

@profuel profuel commented Jan 19, 2021

We use this quite often, so I think it makes sense to include in the convention


```js
function createPage(pageName) {
return new Page(pageName)
Copy link

@silesky silesky Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create makes sense.

However, the “new” keyword already implies “create”, making the example potentially confusing, since it’s adds no meaningful context and thus seems like an overly ‘contrived’ abstraction.

Would it make sense for this example to imitate delete (where it assumes a database model)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants