Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function g(o) {
this.created_at = moment().format('MMMM Do YYYY, h:mm:ss a');
this.entity = Inflector.camelize(o.model.entity);
this.attrs = JSON.stringify(o.model.attr);
// console.log(o);
this.model = o.model.entity;
this.models = Inflector.pluralize(o.model.entity);
this.out_file_name = o.route_path +'/'+ this.models + ".js";
this.source_file = o.root_path + '/tpl/routes/movies.js'
// console.log(this);
var source = this.source_file;
var dest = this.out_file_name;
tpl.tpl_apply(source, this, dest);
}
memberPath() {
let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
return this._.pathPrefix(this.shallow) + resources + '/' + this.id
}
name: 'By user',
renderContent: () => !error && ,
},
]);
usePageTitle(useValueUnless(() => `Event-provided ${pluralize(data.convention.ticket_name)}`, error));
if (error) {
return ;
}
return (
<>
<h1>
{'Event-provided '}
{pluralize(data.convention.ticket_name)}
{' report'}
</h1>
<h3>
{'Total: '}
{pluralizeWithCount(
`event-provided ${data.convention.ticket_name}`,
sum(data.convention.reports.event_provided_tickets.map((row) => row.tickets.length)),
)}
</h3>
);
}
function StandardItemMetadata() {
const { formType } = useContext(FormEditorContext);
const { standardItem } = useContext(FormItemEditorContext);
return (
<>
<div>
<i>
{' '}
<strong>{standardItem.description || humanize(standardItem.identifier)}</strong>
</i></div><i>
<div>
<small>
Standard item for
{' '}
{pluralize(formType.description)}
</small>
</div>
);
}
</i>
<div>
Counts towards totals:
<strong>{signup.counted ? ' yes' : ' no'}</strong>
</div>
{renderCountedToggle()}
<li>
<div>
{humanize(underscore(run.event.event_category.team_member_name))}
:
<strong>{teamMember ? ' yes' : ' no'}</strong>
</div>
Go to
{' '}
{pluralize(run.event.event_category.team_member_name)}
</li>
);
};
{
currentAbility.can_update_event
? (
<div>
<div>
Event Admin
</div>
<ul>
<li>
Edit event
</li>
<li>
Edit
{' '}
{pluralize(event.event_category.team_member_name)}
</li>
</ul>
</div>
)
: null
}
onChange={changeTicketMode}
disabled={disabled}
/>
);
}
newPath() {
let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
return this._.pathPrefix() + resources + '/new'
}
keyForRelationship(modelName) {
return camelize(pluralize(modelName));
}
find(type, ids) {
let collection = this._collectionForType(type);
let records = collection.find(ids);
if (Array.isArray(ids)) {
assert(
records.length === ids.length,
`Couldn't find all ${pluralize(type)} with ids: (${ids.join(',')}) (found ${records.length} results, but was looking for ${ids.length})`
);
}
return this._hydrate(records, dasherize(type));
}