Comparing version 1.0.2 to 1.0.3
11
cli.js
@@ -12,3 +12,2 @@ #!/usr/bin/env node | ||
const { env } = process; | ||
const hasIntl = typeof Intl === "object"; | ||
const locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || "en"; | ||
@@ -23,5 +22,9 @@ const isVerbose = !!argv.verbose; | ||
*/ | ||
const format = (num) => hasIntl | ||
? num.toLocaleString(locale) | ||
: `${num}`; | ||
const format = (num) => { | ||
try { | ||
return num.toLocaleString(locale); | ||
} catch (error) { | ||
return `${num}`; | ||
} | ||
} | ||
@@ -28,0 +31,0 @@ getMarkdownStats(dir).then(stats => { |
{ | ||
"name": "md-stats", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A tool to report on statistics for Markdown file content within a folder (recursively).", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3845
71