Download wp-calypso/client/lib/media-serialization/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 568 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/media-serialization/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/media-serialization/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/media-serialization/index.js
568 Bytes
| import detectFormat from './detect-format'; | |
| import Strategies from './strategies'; | |
| /** | |
| * Accepts a node of mixed type, attempts to recursively parse all relevant | |
| * media metadata, and returns an object including all detected values. | |
| * @param {*} node Media object to parse | |
| * @param {Object} _parsed In recursion, the known values | |
| * @returns {Object} Object of all detected values | |
| */ | |
| export function deserialize( node, _parsed ) { | |
| const format = detectFormat( node ); | |
| return Strategies[ format.toLowerCase() ].deserialize( node, _parsed ); | |
| } | |