I am struggling with removing diacritics from a string in my Ember.js app. After discovering the 'fold-to-ascii' plugin on GitHub, I added it to my project using npm. Although the plugin is visible under the node_modules folder, I'm unsure of how to actually use it in my app.
The documentation suggests using the plugin like this:
var foldToAscii = require("fold-to-ascii");
foldToAscii.fold("★Lorém ïpsum dölor.")
Unfortunately, when I try to implement this, I encounter an exception:
Uncaught Error: Could not find module fold-to-ascii
I also attempted to import the plugin as suggested by @Kori John Roys:
import foldToAscii from 'fold-to-ascii'
However, this results in a new exception:
Error while processing route: transports.index
Could not find module fold-to-ascii imported from test-ember/pods/transport/model
I am puzzled by these issues. What could I be doing wrong?