- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
27 lines
738 B
JavaScript
27 lines
738 B
JavaScript
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.expandState = expandState;
|
|
|
|
var _path = _interopRequireDefault(require("path"));
|
|
|
|
var _camelcase = _interopRequireDefault(require("camelcase"));
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
const validCharacters = /[^a-zA-Z0-9_-]/g;
|
|
|
|
function getComponentName(state) {
|
|
if (!state.filePath) return 'SvgComponent';
|
|
const pascalCaseFileName = (0, _camelcase.default)(_path.default.parse(state.filePath).name.replace(validCharacters, ''), {
|
|
pascalCase: true
|
|
});
|
|
return `Svg${pascalCaseFileName}`;
|
|
}
|
|
|
|
function expandState(state) {
|
|
return {
|
|
componentName: state.componentName || getComponentName(state),
|
|
...state
|
|
};
|
|
} |