Sha256: fe37d6f8879c74f179a7bd7062b530d2369fe1cc1b3b02dab6484d3e082d3d9c

Contents?: true

Size: 319 Bytes

Versions: 11

Compression:

Stored size: 319 Bytes

Contents

const toLowerCase = Function.call.bind("".toLowerCase);

export default function formatBuilderName(type) {
  // FunctionExpression -> functionExpression
  // JSXIdentifier -> jsxIdentifier
  // V8IntrinsicIdentifier -> v8IntrinsicIdentifier
  return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase);
}

Version data entries

11 entries across 10 versions & 3 rubygems

Version Path
disco_app-0.16.1 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.15.2 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.18.4 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.18.1 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.14.0 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@babel/types/scripts/utils/formatBuilderName.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/@babel/types/scripts/utils/formatBuilderName.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@babel/types/scripts/utils/formatBuilderName.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@babel/types/scripts/utils/formatBuilderName.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/@babel/types/scripts/utils/formatBuilderName.js