MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / plural

Function plural

api/prettydiff-webtool.ts:3102–3111  ·  view source on GitHub ↗
(x:number, y:string)

Source from the content-addressed store, hash-verified

3100 };
3101 meta.time = (function dom_event_execute_app_renderOutput_proctime() {
3102 const plural = function dom_event_execute_app_renderOutput_proctime_plural(x:number, y:string):string {
3103 let a = x + y;
3104 if (x !== 1) {
3105 a = `${a}s`;
3106 }
3107 if (y !== " second") {
3108 a = `${a} `;
3109 }
3110 return a;
3111 },
3112 minute = function dom_event_execute_app_renderOutput_proctime_minute():void {
3113 minutes = elapsed / 60;
3114 minuteString = plural(minutes, " minute");

Callers 2

minuteFunction · 0.70
renderOutputFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected