-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import commonEuropean from "logos:constants/transformers/pluralisers/common-european"; | ||
import commonSlavic from "logos:constants/transformers/pluralisers/common-slavic"; | ||
import invariant from "logos:constants/transformers/pluralisers/invariant"; | ||
import romanian from "logos:constants/transformers/pluralisers/romanian"; | ||
|
||
export default Object.freeze({ commonEuropean, commonSlavic, invariant, romanian }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function pluralise(_: string, { one: singular }: Record<string, string> = {}): string | undefined { | ||
if (singular === undefined) { | ||
return undefined; | ||
} | ||
|
||
return singular; | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { describe, it } from "bun:test"; | ||
import pluralisers from "logos:constants/transformers/pluralisers"; | ||
import { expect } from "chai"; | ||
|
||
describe("The pluralisers object", () => { | ||
it("is immutable.", () => { | ||
expect(Object.isFrozen(pluralisers)).to.be.true; | ||
}); | ||
}); |