How to use the inflected.underscore 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 neinteractiveliterature / intercode / app / javascript / EventsApp / SignupAdmin / RunEmailList.jsx View on Github external
return [...currentIncludes].sort().map((include) => {
              if (include === 'teamMembers') {
                return humanize(underscore(pluralize(
                  data.event.event_category.team_member_name,
                )));
              }

              return humanize(underscore(include));
            }).join(', ');
          }}
github graphiti-api / spraypaint.js / lib-esm / decorators.js View on Github external
var factoryFn = function (target, propKey) {
            if (optsOrType === undefined) {
                var inferredType = pluralize(underscore(propKey));
                opts = {
                    jsonapiType: inferredType
                };
            }
            else if (typeof optsOrType === "string") {
                opts = {
                    jsonapiType: optsOrType
                };
            }
            else if (isModelClass(optsOrType)) {
                opts = {
                    type: optsOrType
                };
            }
            else {
                opts = {
github cowboyd / mirage-server / lib / utils / inflector.js View on Github external
export function dasherize(word) {
  return _dasherize(underscore(word));
}
github ForestAdmin / forest-express-sequelize / serializers / stripe-cards.js View on Github external
keyForAttribute: function (key) {
      return Inflector.underscore(key);
    },
    typeForAttribute: function (attr) {
github graphiti-api / spraypaint.js / lib-esm / model.js View on Github external
JSORMBase.serializeKey = function (key) {
        switch (this.keyCase.server) {
            case "dash": {
                return dasherize(underscore(key));
            }
            case "snake": {
                return underscore(key);
            }
            case "camel": {
                return camelize(underscore(key), false);
            }
        }
    };
    JSORMBase.deserializeKey = function (key) {
github capejs / capejs / lib / cape / collection_agent.js View on Github external
memberPath(id) {
    let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
    return this._.pathPrefix(this.shallow) + resources + '/' + id
  }
github neinteractiveliterature / intercode / app / javascript / EventsApp / TeamMemberAdmin / NewTeamMember.jsx View on Github external
awaitRefetchQueries: true,
    });

    history.replace(`${eventPath}/team_members`);
  };

  return (
    <>
      <h1>
        {'Add '}
        {titleize(underscore(event.event_category.team_member_name))}
      </h1>

      <div>
        <label>
          {`${humanize(underscore(event.event_category.team_member_name))}`}
          {' '}
          to add
        </label>
        
      </div>

      {
        teamMember.user_con_profile
          ? (
github capejs / capejs / lib / cape / resource_agent.js View on Github external
collectionPath() {
    let resources = Inflector.pluralize(Inflector.underscore(this.resourceName))
    return this._.pathPrefix() + resources
  }