Skip to content

Conversation

@JRogaishio
Copy link

Checklist

  • Tests
  • Docs
  • Type definitions

Changes:

  • Added wrap and _unwrap methods to Model.js to mimic Laravel's resource data wrapping. This makes for $first, $find, $get, and $all obsolete but I kept them for backward compatibility. The the overloadable wrap() allows you to automatically unwrap using the standard first, find, get, all methods but also change what the wrapper key is in case you don't want to use the standard 'data' property
  • Lock the defu package to 6.1.2. Version 6.1.3+ has a regression that prevents exported objects from merging with plain objects.
  • Added unit tests for the new wrap() method
  • Added new wrap() type
  • Updated documentation for new wrap() type

@JRogaishio JRogaishio merged commit 0e4744d into master Oct 4, 2024
12 checks passed
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.

2 participants