Files
wordpress/wp-includes/js
Adam Silverstein ba0970ab28 WP-API JS Client: Add helpers to get a model or collection by route.
Add two new helper functions, `wp.api.getModelByRoute` and `wp.api.getCollectionByRoute`. Passed a route, they return the matching model or collection, or `undefined` if none is found.

Also adds tests to verify these functions work as expected.

Props rcutmore.
Fixes #41111.

Built from https://develop.svn.wordpress.org/trunk@41334


git-svn-id: http://core.svn.wordpress.org/trunk@41165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 16:01:43 +00:00
..
2017-09-01 12:28:46 +00:00
2017-08-02 17:16:44 +00:00
2017-08-14 02:04:45 +00:00
2017-08-14 02:04:45 +00:00