Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const addCard = e => {
let sampleName = e.target.value;
if (sampleName.indexOf("software-panel-") > -1) {
const panel = softwarePanels.find(
i => i.id === sampleName.replace("software-panel-", ""),
);
sampleName = panel ? panel.name : sampleName;
}
if (sampleName.indexOf("interface-id:-") > -1) {
const int = interfaces.find(
i => i.id === sampleName.replace("interface-id:", ""),
);
sampleName = int ? int.name : sampleName;
}
let name = prompt("What is the card name?", titleCase(sampleName));
const cardComponent = e.target.value;
if (name) {
const variables = {
id: selectedStationSet,
name: station.name,
cardName: name,
cardComponent,
};
client.mutate({
mutation: ops.addCard,
variables,
});
}
};
const toggleStationMessageGroup = (evt, group) => {
);
const tasksToRender = this.tasksToRender();
const { filterStatus } = this.state;
return (
<div>
<hr>
<h5>Recent Task IDs claimed</h5>
<table>
<thead>
<tr>
<th>
<menuitem>All</menuitem>
<menuitem>
{groups.map(group => (
<menuitem>
{titleCase(group)}
</menuitem>
))}
</menuitem>
</th>
<th>Name</th>
<th>Task ID</th></tr></thead></table></div>
{filterOptions.map(c => (
toggleFilter(c)}
>
{titleCase(c)}
))}
render() {
const defaultProps = Project.defaultProps;
const rootPath = atom.project.getPaths()[0];
let props = { ...defaultProps, title: path.basename(rootPath) };
if (atom.config.get('project-manager.prettifyTitle')) {
props.title = changeCase.titleCase(path.basename(rootPath));
}
if (this.props.project && this.props.project.source === 'file') {
const projectProps = this.props.project.getProps();
props = Object.assign({}, props, projectProps);
}
const wrapperStyle = {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
};
const style = {
width: '500px',
};
this.fs.copyTpl(
this.templatePath('template/typings.json'),
this.destinationPath('typings.json'),
{
name: this.props.sourceDeliveryPackageName,
main: this.props.sourceMain,
homepage: this.props.sourceHomepage,
version: this.props.sourceVersion
});
this.fs.copyTpl(
this.templatePath('template/README.md'),
this.destinationPath('README.md'),
{
prettyPackageName: changeCase.titleCase(this.props.sourceDeliveryPackageName.replace('-', ' ')),
sourcePackageName: this.props.sourceDeliveryPackageName,
sourcePackageUrl: this.props.sourceRepository,
organization: this.props.repositoryOrganization,
packageName: this.props.repositoryName,
license: this.props.license,
generatorVersion: GENERATORVERSION
});
this.fs.copyTpl(
this.templatePath('template/package.json'),
this.destinationPath('package.json'),
{
ambient: !(~this.props.sourceUsages.indexOf('commonjs') ||
~this.props.sourceUsages.indexOf('amd') ||
~this.props.sourceUsages.indexOf('esm')) ? ' --ambient' : '',
renderTile={(id, path) => {
return (
) : (
titleCase(id)
)
}
toolbarControls={[
,
,
,
]}
createNode={e => e}
>
{(() => {
if (id && id.indexOf("Picker") > -1) {
return (
);
}
const Comp = Cores[id] || (() => null);
{action => (
this.setState({ [s]: Math.abs(1 - level) })
}
mouseUp={level =>
action({
variables: {
id,
which: s,
value: Math.round(100 * level)
}
{scopes.map(op => <li>{titleCase(op)})}
}</li>
checked={allowed[c] || false}
onChange={() =>
this.setState(
state => ({
allowed: {...state.allowed, [c]: !state.allowed[c]},
}),
() => {
localStorage.setItem(
"allowed_coreFeed",
JSON.stringify(this.state.allowed),
);
},
)
}
/>{" "}
{titleCase(c.replace("Core", ""))}
))}
{properties.map(p => (
<li> {
selectProperty(p);
}}
className={`list-group-item ${
selectedProperty === p ? "selected" : ""
}`}
>
{titleCase(p)}
</li>
))}