mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 03:43:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			335 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			335 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
'use strict';
 | 
						|
 | 
						|
const _ = require('lodash');
 | 
						|
const pluralize = require('pluralize');
 | 
						|
 | 
						|
const toPlural = str => pluralize(_.camelCase(str));
 | 
						|
const toSingular = str => _.camelCase(pluralize.singular(str));
 | 
						|
 | 
						|
const toInputName = str => `${_.upperFirst(toSingular(str))}Input`;
 | 
						|
 | 
						|
module.exports = {
 | 
						|
  toSingular,
 | 
						|
  toPlural,
 | 
						|
  toInputName,
 | 
						|
};
 |