Kaynağa Gözat

Fix negative

Make word positive when making negative a negative number.
master
TheoryOfNekomata 9 ay önce
ebeveyn
işleme
8140cda623
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  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 Dosyayı Görüntüle

@@ -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}`;
};

Yükleniyor…
İptal
Kaydet