Download wp-calypso/client/state/ui/selectors/get-section.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/selectors/get-section.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/ui/selectors/get-section.js
-
curl -L -o get-section.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/selectors/get-section.js
509 Bytes
| import 'calypso/state/ui/init'; | |
| /** | |
| * @typedef {Object} Section | |
| * @property {string} name - The name of the section | |
| * @property {string[]} paths - The URL paths of the section | |
| * @property {string} module - The module path of the section | |
| * @property {string} group - The group of the section | |
| * | |
| * Returns the current section. | |
| * @param {Object} state Global state tree | |
| * @returns {Section} Current section | |
| */ | |
| export default function getSection( state ) { | |
| return state.ui.section || false; | |
| } | |