How to use the inflected.pluralize function in inflected

To help you get started, we’ve selected a few inflected examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github moajs / moa / lib / route.js View on Github external
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);
}
github capejs / capejs / lib / cape / resource_agent.js View on Github external
memberPath() {
    let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
    return this._.pathPrefix(this.shallow) + resources + '/' + this.id
  }
github neinteractiveliterature / intercode / app / javascript / Reports / EventProvidedTickets.jsx View on Github external
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) =&gt; row.tickets.length)),
        )}
      </h3>
      
      
    
  );
}
github neinteractiveliterature / intercode / app / javascript / FormAdmin / FormItemTools.jsx View on Github external
function StandardItemMetadata() {
  const { formType } = useContext(FormEditorContext);
  const { standardItem } = useContext(FormItemEditorContext);

  return (
    &lt;&gt;
      <div>
        <i>
        {' '}
        <strong>{standardItem.description || humanize(standardItem.identifier)}</strong>
      </i></div><i>
      <div>
        <small>
          Standard item for
          {' '}
          {pluralize(formType.description)}
        </small>
      </div>
    
  );
}
</i>
github neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / EditSignup.jsx View on Github external
<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>
        
      
    );
  };
github neinteractiveliterature / intercode / app / javascript / EventsApp / EventPage / EventPageDisplay.jsx View on Github external
{
              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
            }
github capejs / capejs / lib / cape / resource_agent.js View on Github external
newPath() {
    let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
    return this._.pathPrefix() + resources + '/new'
  }
github cowboyd / mirage-server / lib / serializer.js View on Github external
keyForRelationship(modelName) {
    return camelize(pluralize(modelName));
  }
github cowboyd / mirage-server / lib / orm / schema.js View on Github external
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));
  }