finki-main
main
|
Last change
on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
412 bytes
|
| Line | |
|---|
| 1 | // warning: extremely hot code path.
|
|---|
| 2 | // This has been meticulously optimized for use
|
|---|
| 3 | // within npm install on large package trees.
|
|---|
| 4 | // Do not edit without careful benchmarking.
|
|---|
| 5 | const normalizeCache = Object.create(null)
|
|---|
| 6 | const { hasOwnProperty } = Object.prototype
|
|---|
| 7 | module.exports = s => {
|
|---|
| 8 | if (!hasOwnProperty.call(normalizeCache, s)) {
|
|---|
| 9 | normalizeCache[s] = s.normalize('NFD')
|
|---|
| 10 | }
|
|---|
| 11 | return normalizeCache[s]
|
|---|
| 12 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.