...
 
Commits (2)
{
"name": "utfu",
"version": "0.1.8",
"version": "0.1.9",
"@pika/pack": {
"pipeline": [
[
......
<h1 align="center">Welcome to utfu 👋</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-0.1.0-blue.svg?cacheSeconds=2592000" />
<img alt="Version" src="https://img.shields.io/badge/version-0.1.8-blue.svg?cacheSeconds=2592000" />
<a href="#" target="_blank">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
</a>
......@@ -27,6 +27,8 @@ import utfu from 'utfu'
const dirtyText = 'On a certain level, it�s like shouting �fire� in a crowded theater.'
const cleanText = utfu.hex(dirtyText) || utfu.txt(dirtyText)
// --> 'On a certain level, it’s like shouting “fire” in a crowded theater.'
```
## Run tests
......
......@@ -509,7 +509,7 @@ const txt = str => {
if (typeof str !== 'string') throw new Error('utfu requires a string to process');
mappings.forEach(mapping => {
const text = new RegExp(`${mapping.misrender}`, 'gu');
str = str.replace(text, mapping.char);
str = str.replace(text, mapping.utf8);
});
return str;
};
......
This diff is collapsed.
......@@ -13,7 +13,7 @@ const txt = str => {
if (typeof str !== 'string') throw new Error('utfu requires a string to process');
mappings.forEach(mapping => {
const text = new RegExp(`${mapping.misrender}`, 'gu');
str = str.replace(text, mapping.char);
str = str.replace(text, mapping.utf8);
});
return str;
};
......
......@@ -505,7 +505,7 @@ const txt = str => {
if (typeof str !== 'string') throw new Error('utfu requires a string to process');
mappings.forEach(mapping => {
const text = new RegExp(`${mapping.misrender}`, 'gu');
str = str.replace(text, mapping.char);
str = str.replace(text, mapping.utf8);
});
return str;
};
......
This diff is collapsed.
{
"name": "utfu",
"description": "Attempts to fix busted character encodings carried over from legacy text formats.",
"version": "0.1.8",
"version": "0.1.9",
"license": "MIT",
"files": [
"dist-*/",
......