Skip to content
Discussion options

You must be logged in to vote

As I research on the Request class I found adonis use lodash pick method
like below

/**
   * Returns value for only given keys.
   *
   * @method only
   *
   * @param  {Array} keys
   *
   * @return {Object}
   *
   * @example
   * ```js
   * request.only(['username', 'age'])
   * ```
   */
  only (keys) {
    return _.pick(this.all(), keys)
  }

so I can do this with lodash pick

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by farshadfahimi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant