{"_id":"name-fixer","_rev":"1-fd0461631fb7c52f1cec193b42a27131","name":"name-fixer","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"name-fixer","version":"1.0.0","description":"A fully typed library for fixing capitalization of people's names. Based on tamtamchik PHP library.","main":"dist/index.js","umd:main":"dist/index.umd.js","source":"src/index.ts","module":"dist/index.module.js","unpkg":"dist/index.umd.js","types":"dist/index.d.ts","keywords":["name-fixer","namefixer","fixer","name-case","namecase","name","capitalization","names","case","internationalization"],"scripts":{"build":"microbundle","dev":"microbundle watch","release":"yarn build && np","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","format":"prettier --write  \"{src,__tests__}/**/*.ts\"","lint":"eslint --fix \"{src,__tests__}/**/*.ts\"","typecheck":"tsc --noEmit","coveralls":"yarn test:coverage && cat ./coverage/lcov.info | coveralls","prepublishOnly":"yarn test && yarn lint","preversion":"yarn lint","version":"yarn format && git add -A","postversion":"git push && git push --tags","prepare":"husky install","pre-commit":"lint-staged"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/daniseijo/name-fixer.git"},"bugs":{"url":"https://github.com/daniseijo/name-fixer/issues"},"lint-staged":{"{src,__tests__}/**/*.ts":["eslint --cache --fix","prettier --write","jest --findRelatedTests"]},"homepage":"https://github.com/daniseijo/name-fixer#readme","author":{"name":"Daniel Seijo","email":"daniseijo.dev@gmail.com"},"license":"MIT","devDependencies":{"@tsconfig/node16":"^1.0.3","@types/jest":"^29.1.1","@types/node":"^18.8.2","@typescript-eslint/eslint-plugin":"^5.39.0","@typescript-eslint/parser":"^5.39.0","coveralls":"^3.1.1","eslint":"^8.24.0","eslint-config-prettier":"^8.5.0","eslint-plugin-jest":"^27.1.0","eslint-plugin-prettier":"^4.2.1","husky":"^8.0.1","jest":"^29.1.2","lint-staged":"^13.0.3","microbundle":"0.15.1","np":"^7.6.2","prettier":"^2.7.1","ts-jest":"^29.0.3","typescript":"^4.8.4"},"licenseText":"MIT License\n\nCopyright (c) 2022 Daniel Seijo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"name-fixer@1.0.0","dist":{"shasum":"beba8be53cdc426ef67a2decc73d1288a2aef4e9","integrity":"sha512-GOvcwn02X4445CBZCFgSPXgf6r4TEkqSV61/1cuGEQAQB/WO4uAhc80lb7+eI5pBjhzP/RlmrG+Wr3F9aXTy5A==","tarball":"https://registry.npmjs.org/name-fixer/-/name-fixer-1.0.0.tgz","fileCount":15,"unpackedSize":120878,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFjQyP8tJxua68jAaakB4+U0yNyXtvImUPNSp0dR96nbAiEA4qV2egP80CIUa7eE9l5hk9A4OvulR+MOluDhuV0c2fQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPdTJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPSg/+Nipi/ko4FoQ6uG1W7CI7710q0SQxEwisQDoZsOgHWqfcz64a\r\nN+bNX9QQ7QHMarNwipnvPE8LoOaFJxyBFnlhLOBZrKRIZESN+xjEyqQxDA9j\r\nvtUNomBfX8v4Hmq5FdvTqJ6kAfuk1gpAEY7JcuiUbfAU4WUDCvHyHfWoyvhd\r\n5iyVbxutNlqqBrnKK6LkdtM74U5PjUMJyxNZ/rhs9qq6LTXBtJZOPCyme1O/\r\nGh7nNiZ8u4o070uT+V7pfBje+kk8lVuWhZDmDtduLLXdFJaKpenhoa8MU0pg\r\ncXe6ispaNjotZiyMZ+ukkJ3iqTLutia8QvfP52tQfh5OCM0C2SdBbrmk+MSP\r\nMCGO1INgMw7IdSWKSjEmE/UfG4HFordNFYs26tsRg/XyeD8ZAP2NMTtHjxO6\r\nn1MJfZ0B317EUgNxw66m1Vau2aV2I2era/KHwxh5QWwiCN/HPO9o8bTcHvt2\r\nwu1p5+JEuOQMK8Bd1kyD/RV2g+Yz6NOON+gLj6IXxWfxccx8yZ5rWameK5jt\r\n/q9uG+B+xjLt6G1SbWbRrq1JKEiZmo47DczTgM4IKD12hJTjC+/xJXKFCF/y\r\nBdjrJk6XEqK1gxyhFudflZQT8dJg41n9tCk/iaMAxVVqsRsQmu0Vyx25q1TK\r\nwTBc0bKWHIB480burVOw81FEKy+7nnKDWiI=\r\n=F4Pj\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"daniseijo","email":"daniseijo.dev@gmail.com"},"directories":{},"maintainers":[{"name":"daniseijo","email":"daniseijo.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-fixer_1.0.0_1664996553165_0.9743648743648701"},"_hasShrinkwrap":false},"1.0.1":{"name":"name-fixer","version":"1.0.1","description":"A fully typed library for fixing capitalization of people's names. Based on tamtamchik PHP library.","main":"dist/index.js","source":"src/index.ts","types":"dist/index.d.ts","keywords":["name-fixer","namefixer","fixer","name-case","namecase","name","capitalization","names","case","internationalization"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/daniseijo/name-fixer.git"},"bugs":{"url":"https://github.com/daniseijo/name-fixer/issues"},"lint-staged":{"{src,__tests__}/**/*.ts":["eslint --cache --fix","prettier --write","jest --findRelatedTests"]},"engines":{"node":">=16.0.0"},"homepage":"https://github.com/daniseijo/name-fixer#readme","author":{"name":"Daniel Seijo","email":"daniseijo.dev@gmail.com"},"license":"MIT","devDependencies":{"@tsconfig/node-lts":"^18.12.5","@types/jest":"^29.5.7","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^6.9.1","@typescript-eslint/parser":"^6.9.1","eslint":"^8.52.0","eslint-config-prettier":"^9.0.0","eslint-plugin-jest":"^27.6.0","eslint-plugin-prettier":"^5.0.1","husky":"^8.0.3","jest":"^29.7.0","lint-staged":"^15.0.2","np":"^8.0.4","prettier":"^3.0.3","ts-jest":"^29.1.1","tsup":"^7.2.0","typescript":"^5.2.2"},"scripts":{"build":"tsup src/index.ts --dts","release":"pnpm build && np","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","format":"prettier --format  \"{src,__tests__}/**/*.ts\"","check-format":"prettier --check  \"{src,__tests__}/**/*.ts\"","lint":"eslint --fix \"{src,__tests__}/**/*.ts\"","typecheck":"tsc --noEmit","preversion":"pnpm lint","version":"pnpm format && git add -A","postversion":"git push && git push --tags","pre-commit":"lint-staged"},"_id":"name-fixer@1.0.1","_integrity":"sha512-PLZrXpQ+66HCDpfvP9e/FCkqDdauDT/Mdn/XcABCsAAj5o+lgQuc8/ZyO2IKze/956oacWMwh6SIdomHI2/bHw==","_resolved":"/private/var/folders/28/9xs84q8169757p09z5g1p38h0000gs/T/82dd4b9c9436243d954cb7c0d83ab52e/name-fixer-1.0.1.tgz","_from":"file:name-fixer-1.0.1.tgz","_nodeVersion":"20.8.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-PLZrXpQ+66HCDpfvP9e/FCkqDdauDT/Mdn/XcABCsAAj5o+lgQuc8/ZyO2IKze/956oacWMwh6SIdomHI2/bHw==","shasum":"5e8f1ac249a8beb82498d6e9d1de4b82645c221f","tarball":"https://registry.npmjs.org/name-fixer/-/name-fixer-1.0.1.tgz","fileCount":5,"unpackedSize":24781,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFqfCRC2FrLY2E0xqdRRxNxTk4ixzQAgzkvXBTJ2SRTzAiEAxTpHdF3oTKtXYcn+2lvV2nfJpx+5wOvXFBigXnL5B6E="}]},"_npmUser":{"name":"daniseijo","email":"daniseijo.dev@gmail.com"},"directories":{},"maintainers":[{"name":"daniseijo","email":"daniseijo.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/name-fixer_1.0.1_1699024950885_0.17426386310508524"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-05T19:02:33.073Z","1.0.0":"2022-10-05T19:02:33.312Z","modified":"2023-11-03T15:22:31.299Z","1.0.1":"2023-11-03T15:22:31.129Z"},"maintainers":[{"name":"daniseijo","email":"daniseijo.dev@gmail.com"}],"description":"A fully typed library for fixing capitalization of people's names. Based on tamtamchik PHP library.","homepage":"https://github.com/daniseijo/name-fixer#readme","keywords":["name-fixer","namefixer","fixer","name-case","namecase","name","capitalization","names","case","internationalization"],"repository":{"type":"git","url":"git+https://github.com/daniseijo/name-fixer.git"},"author":{"name":"Daniel Seijo","email":"daniseijo.dev@gmail.com"},"bugs":{"url":"https://github.com/daniseijo/name-fixer/issues"},"license":"MIT","readme":"# name-fixer\n\n[![npm][ico-npm]][link-npm]\n[![Node.js CI][ico-github-actions]][link-github-actions]\n[![Coverage Status][ico-coveralls]][link-coveralls]\n[![npm bundle size][ico-bundle-size]][link-bundle-size]\n\nname-fixer is a fully typed implementation of `Lingua::EN::NameCase`, a library for converting strings to be properly cased. This is good for converting denormalized data to human friendly data.\n\n**NOTE:** This is a fork from the discontinued library [@foundernest/namecase](https://github.com/foundernest/namecase). I was the author but I don't work in that company anymore. I still wanted to continue improving the library. \n\n## Description\n\nForenames and surnames are often stored either entirely in UPPERCASE or lowercase. This library allows you to convert names into the correct case where possible. Although forenames and surnames are typically stored separately if they do appear in a single string, whitespace-separated, name-fixer deals correctly with them.\n\nCurrently name-fixer correctly name cases names which include any of the following:\n\n```txt\nMc, Mac, al, el, ap, bat, ben, bin, binti, binte, da, de, das, dos, delle, della, di, du, del, der, den, ten, ter, la, le, lo, van and von.\n```\n\nIt correctly deals with names which contain apostrophes and hyphens too.\n\n## Installation\n\nVia npm\n\n```bash\nnpm install name-fixer\n```\n\nVia yarn\n\n```bash\nyarn add name-fixer\n```\n\nVia pnpm\n\n```bash\npnpm add name-fixer\n```\n\n## Usage\n\n### Basic usage\n\n```typescript\nimport { nameFixer } from 'name-fixer';\n\nnameFixer('KEITH');               // => Keith\nnameFixer('LEIGH-WILLIAMS');      // => Leigh-Williams\nnameFixer('MCCARTHY');            // => McCarthy\nnameFixer(\"O'CALLAGHAN\");         // => O'Callaghan\nnameFixer('ST. JOHN');            // => St. John\nnameFixer('VON STREIT');          // => von Streit\nnameFixer('AP LLWYD DAFYDD');     // => ap Llwyd Dafydd\nnameFixer('HENRY VIII');          // => Henry VIII\nnameFixer('VAN DYKE');            // => van Dyke\n```\n\n### Advance usage\n\nYou can override the default options by calling the `nameFixer` function with the `EnvironmentOptions` optional parameter:\n\n```typescript\nimport { nameFixer } from 'name-fixer';\n\nnameFixer('macmurdo');                        // => MacMurdo\nnameFixer('macmurdo', { irish: false });      // => Macmurdo\n```\n\nYou can also set the options of all the subsequent calls:\n\n```typescript\nimport { nameFixer, setOptions } from 'name-fixer';\n\nnameFixer('macmurdo');               // => MacMurdo\nsetOptions({ irish: false });\nnameFixer('macmurdo');               // => Macmurdo\n```\n\nOr you can even create a new `Environment` object with custom options:\n\n```typescript\nimport Environment from 'name-fixer';\n\nconst ncEnv = new Environment({\n  lazy: false\n  roman: false\n});\n\nncEnv.nameFixer('Na li');     // => Na Li\n```\n\n## Options\n\n- `lazy` – Default: `true`. Do not do anything if string is already mixed case and lazy option is `true`.\n- `irish` – Default: `true`. Correct \"Mac\" exceptions.\n- `spanish` – Default: `true`. Correct spanish conjunctions `y`, `e` or `i`.\n- `roman` – Default: `true`. Correct roman numbers.\n- `hebrew` – Default: `true`. Correct `ben`, `bat`.\n- `postNominal` – Default: `true`. Correct post-nominal. e.g. `PhD`.\n\n## Exclude Post-Nominals\n\n```typescript\nimport { excludePostNominals, nameFixer } from 'name-fixer';\n\nnameFixer('ČERNÝ MOST');         // Černý MOst\nexcludePostNominals('MOst');\nnameFixer('ČERNÝ MOST');         // Černý Most\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information about what has changed recently.\n\n## Testing\n\n```bash\npnpm test\n```\n\n## Contributing\n\nPlease see the [Contributing guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) for details.\n\n## Acknowledgements\n\nThis library is a port of the [PHP package](https://github.com/tamtamchik/namecase) by Yuri Tkachenko which is also a port of the [Perl library](https://metacpan.org/release/BARBIE/Lingua-EN-NameCase-1.19) and owes most of its functionality to the Perl version by Mark Summerfield.\nAny bugs in the Typescript port are my fault.\n\n## Credits\n\nOriginal PERL `Lingua::EN::NameCase` Version:\n\n- Copyright &copy; Mark Summerfield 1998-2014. All Rights Reserved.\n- Copyright &copy; Barbie 2014-2020. All Rights Reserved.\n\nRuby Version:\n\n- Copyright &copy; Aaron Patterson 2006. All Rights Reserved.\n\nPHP Version:\n\n- Copyright &copy; Yuri Tkachenko 2016-2020. All Rights Reserved.\n\nTypescript version:\n\n- Copyright &copy; [Daniel Seijo][link-author]\n\n**NOTE:** This is a fork from [foundernest/namecase](https://github.com/foundernest/namecase) since I don't work there anymore but I still wanted to continue improving the library. \n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n\n[ico-npm]: https://img.shields.io/npm/v/name-fixer\n[ico-github-actions]: https://github.com/daniseijo/name-fixer/actions/workflows/node.js.yml/badge.svg?branch=main\n[ico-coveralls]: https://coveralls.io/repos/github/daniseijo/name-fixer/badge.svg?branch=main\n[ico-bundle-size]: https://img.shields.io/bundlephobia/min/name-fixer\n\n[link-npm]: https://www.npmjs.org/package/name-fixer\n[link-github-actions]: https://github.com/daniseijo/name-fixer/actions/workflows/node.js.yml?branch=main\n[link-coveralls]: https://coveralls.io/github/daniseijo/name-fixer?branch=main\n[link-bundle-size]: https://bundlephobia.com/result?p=name-fixer\n\n[link-author]: https://github.com/daniseijo\n","readmeFilename":"README.md"}