Pārlūkot izejas kodu

Fix negative

Make word positive when making negative a negative number.
master
TheoryOfNekomata pirms 9 mēnešiem
vecāks
revīzija
8140cda623
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. +4
    -3
      packages/core/src/systems/en-US/short-count/stringify.ts

+ 4
- 3
packages/core/src/systems/en-US/short-count/stringify.ts Parādīt failu

@@ -324,6 +324,7 @@ export const mergeTokens = (tokens: string[], options?: MergeTokensOptions) => (
* Makes a negative string.
* @param s - The string to make negative.
*/
export const makeNegative = (s: string) => (
`${NEGATIVE} ${s}`
);
export const makeNegative = (s: string) => {
const negativePrefix = `${NEGATIVE} `;
return s.startsWith(negativePrefix) ? s.slice(negativePrefix.length) : `${negativePrefix}${s}`;
};

Notiek ielāde…
Atcelt
Saglabāt