Download wp-calypso/packages/i18n-calypso-cli/util.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 418 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/i18n-calypso-cli/util.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/i18n-calypso-cli/util.js
-
curl -L -o util.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/i18n-calypso-cli/util.js
418 Bytes
| const fs = require( 'fs' ); | |
| /** | |
| * Reads a list of files and joins their contents together with newlines | |
| * @param {Array<string>} inputFiles Paths of the files to parse | |
| * @returns {string} Concatenated file contents | |
| */ | |
| function concatAllFiles( inputFiles ) { | |
| return inputFiles.map( ( inputFile ) => fs.readFileSync( inputFile, 'utf8' ) ).join( '\n' ); | |
| } | |
| module.exports = { | |
| concatAllFiles, | |
| }; | |