How to use header-case - 2 common examples

To help you get started, we’ve selected a few header-case examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mpyw / axios-case-converter / src / index.js View on Github external
export const snakeRequest = (data, headers) => {
  for (const [key, value] of Object.entries(headers)) {
    header(value, true)
    if (!['common', 'delete', 'get', 'head', 'post', 'put', 'patch'].includes(key)) {
      delete headers[key]
      headers[ccHeader(key)] = value
    }
  }
  return snake(data)
}
export const camelResponse = (data, headers) => {
github vaeum / react-material-icon-svg / gulpfile.babel.js View on Github external
$.tap(file => {
      const fileName = path.basename(file.path);
      const className = lowerCase(headerCase(fileName.replace('.js', '')));

      return gulp
        .src(`${DIST_FOLDER}/${fileName}`)
        .pipe(
          $.replace(
            'classNameString',
            `{...props} className={\`${CLASSNAME} ${CLASSNAME}-${className} \${props.className\}\`}`
          )
        )
        .pipe($.replace(/xmlns:xlink=".+?"/g, ``))
        .pipe($.replace(/xlink:href=".+?"/g, ``))
        .pipe($.replace('fill-rule=', 'fillRule='))
        .pipe($.replace('fill-opacity=', 'fillOpacity='))
        .pipe($.prettier())
        .pipe(gulp.dest(DIST_FOLDER))
        .pipe(gulp.dest(LIB_FOLDER));

header-case

Transform into a dash separated string of capitalized words

MIT
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis

Popular header-case functions