Skip to content

Update documentation to NOT use promise lib specific functions such as .spread #10275

@toymachiner62

Description

@toymachiner62

The comment at the end of this code snippet says:

In the example above, the "spread" on line 39 divides the array into its 2 parts and passes them as arguments to the callback function defined beginning at line 39, which treats them as "user" and "created" in this case. (So "user" will be the object from index 0 of the returned array and "created" will equal "true".)

There is no mention that this is a bluebird (and maybe others) specific promise implementation function.

Two things should be addressed IMO

  1. Remove promise specific implementation logic
  2. Update documentation which mentions things like line 39. There is no line numbers so it's pointless and confusing

http://docs.sequelizejs.com/manual/tutorial/models-usage.html#-findorcreate-search-for-a-specific-element-or-create-it-if-not-available

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions