Download pool/shard003/JavaScript/0019056_section.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard003/JavaScript/0019056_section.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard003/JavaScript/0019056_section.js
-
curl -L -o 0019056_section.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard003/JavaScript/0019056_section.js
737 Bytes
| ; | |
| var _sections = []; | |
| var register = function(section) { | |
| _sections.push(section); | |
| } | |
| var render = function(details, state) { | |
| var html = ''; | |
| for (var i = 0; i < _sections.length; i++) { | |
| html += _sections[i].render(details, state[i]); | |
| } | |
| return html; | |
| } | |
| var postRender = function(holder, details) { | |
| for (var i = 0; i < _sections.length; i++) { | |
| if (_sections[i].postRender) { | |
| _sections[i].postRender(holder, details); | |
| } | |
| } | |
| } | |
| module.exports = { | |
| register: register, | |
| render: render, | |
| postRender: postRender | |
| }; | |
| // TODO: Need to come up with a better self registration process | |
| require('./section-http'); | |
| require('./section-host'); | |
| require('./section-ajax'); | |