Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "typo-js", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A Hunspell-style spellchecker.", | ||
@@ -5,0 +5,0 @@ "main": "typo.js", |
13
typo.js
@@ -529,5 +529,7 @@ /* globals chrome: false */ | ||
else if (!("FLAG" in this.flags)) { | ||
// The flag symbols are single characters | ||
return textCodes.split(""); | ||
} | ||
else if (this.flags.FLAG === "long") { | ||
// The flag symbols are two characters long. | ||
var flags = []; | ||
@@ -542,4 +544,15 @@ | ||
else if (this.flags.FLAG === "num") { | ||
// The flag symbols are a CSV list of numbers. | ||
return textCodes.split(","); | ||
} | ||
else if (this.flags.FLAG === "UTF-8") { | ||
// The flags are single UTF-8 characters. | ||
// @see https://github.com/cfinke/Typo.js/issues/57 | ||
return Array.from(textCodes); | ||
} | ||
else { | ||
// It's possible that this fallback case will not work for all FLAG values, | ||
// but I think it's more likely to work than not returning anything at all. | ||
return textCodes.split(""); | ||
} | ||
}, | ||
@@ -546,0 +559,0 @@ |
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
728544
811
10
0
0
0
1