MCPcopy Create free account
hub / github.com/fbeline/design-patterns-JS / getFileContents

Function getFileContents

scripts/build-docs.js:32–33  ·  view source on GitHub ↗
( path )

Source from the content-addressed store, hash-verified

30
31/* Utility functions */
32const getFileContents = ( path ) => fs.existsAsync( path )
33 .then( exists => exists ? fs.readFileAsync( path, 'utf-8' ) : '' );
34
35const stripPunctuation = ( str ) =>
36 str.replace( /["'.,\/#!$%\^&\*;:’{}=_`~()]/g, '' );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected