Skip to content

Instantly share code, notes, and snippets.

@crowjdh
Created August 8, 2023 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crowjdh/d47705d5435e98dd22b0a4d691432504 to your computer and use it in GitHub Desktop.
Save crowjdh/d47705d5435e98dd22b0a4d691432504 to your computer and use it in GitHub Desktop.
const fs = require('fs');
const path = require('path');
const target_dir = process.argv[2];
fs.readdir(target_dir, function(err, items) {
for(var i = 0; i < items.length; i++) {
nfd_name = items[i];
nfc_name = items[i].normalize('NFC');
console.log(`nfd_name: ${nfd_name}\nnfc_name: ${nfc_name}`);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment