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

Function dashCase

scripts/build-docs.js:38–40  ·  view source on GitHub ↗
( str )

Source from the content-addressed store, hash-verified

36 str.replace( /["'.,\/#!$%\^&\*;:’{}=_`~()]/g, '' );
37
38const dashCase = ( str ) => stripPunctuation( str ).toLowerCase().split( ' ' ).filter(
39 ( word ) => word !== ''
40).join( '-' );
41
42const reverseDashCase= (str) => str.split('-').map(
43 word => word.replace(

Callers 2

writeSectionContentsFunction · 0.85
writeTopicContentsFunction · 0.85

Calls 1

stripPunctuationFunction · 0.85

Tested by

no test coverage detected