Sha256: 3b7ae95a3de35616f872fed87c93a8e9a8b6684d31132eedac6cf8e3f36b3625

Contents?: true

Size: 282 Bytes

Versions: 13

Compression:

Stored size: 282 Bytes

Contents

"use strict";

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

module.exports = function formatBuilderName(type) {
  // FunctionExpression -> functionExpression
  // JSXIdentifier -> jsxIdentifier
  return type.replace(/^([A-Z](?=[a-z])|[A-Z]+(?=[A-Z]))/, toLowerCase);
};

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
condenser-0.0.8 lib/condenser/processors/node_modules/@babel/types/scripts/utils/formatBuilderName.js
jester-data-8.0.0 node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-5.2.1 node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-2.0.1 node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-1.1.0 node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-1.0.0 node_modules/@babel/types/scripts/utils/formatBuilderName.js
condenser-0.0.7 lib/condenser/processors/node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-0.0.0.1.0 node_modules/@babel/types/scripts/utils/formatBuilderName.js
ezii-os-0.0.0.0.1 node_modules/@babel/types/scripts/utils/formatBuilderName.js
condenser-0.0.5 lib/condenser/processors/node_modules/@babel/types/scripts/utils/formatBuilderName.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/@babel/types/scripts/utils/formatBuilderName.js
locomotivecms-3.4.0 app/javascript/node_modules/@babel/types/scripts/utils/formatBuilderName.js
condenser-0.0.4 lib/condenser/processors/node_modules/@babel/types/scripts/utils/formatBuilderName.js