node-normalizer
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -126,3 +126,8 @@ var fs = require('fs'); | ||
msg = msg.replace(/\s+/g, " "); | ||
msg = msg.replace(/(’|‘)/g, "'"); | ||
msg = msg.replace(/(“|”)/g, '"'); | ||
msg = msg.replace(/(–|—)/g, "—"); | ||
msg = msg.replace(/[^\x00-\x7F]/g, ""); | ||
var fileItor = function(item1, next1) { | ||
@@ -129,0 +134,0 @@ |
{ | ||
"name": "node-normalizer", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Normalize and clean text", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -63,3 +63,11 @@ | ||
it("Fix ASCII characters", function() { | ||
norm.clean("What’s up").should.eql("what is up"); | ||
norm.clean("What's up").should.eql("what is up"); | ||
norm.clean("I said “shut up”").should.eql('I said "shut up"'); | ||
norm.clean("œ").should.eql(''); | ||
}); | ||
}); | ||
}); |
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
210152
187