{"id":18821175,"url":"https://github.com/compwright/split-human-name","last_synced_at":"2025-04-14T00:26:38.046Z","repository":{"id":33009943,"uuid":"149605036","full_name":"compwright/split-human-name","owner":"compwright","description":"Split a person's name into firstName and lastName fields","archived":false,"fork":false,"pushed_at":"2024-06-16T12:55:34.000Z","size":1745,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T11:50:08.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/split-human-name","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"compwright"}},"created_at":"2018-09-20T12:21:18.000Z","updated_at":"2024-06-16T12:55:32.000Z","dependencies_parsed_at":"2023-01-14T23:02:09.016Z","dependency_job_id":"dbf85a45-29e4-4136-b452-34ebe78876c4","html_url":"https://github.com/compwright/split-human-name","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fsplit-human-name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fsplit-human-name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fsplit-human-name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Fsplit-human-name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/split-human-name/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248800113,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T00:35:23.577Z","updated_at":"2025-04-14T00:26:38.023Z","avatar_url":"https://github.com/compwright.png","language":"JavaScript","funding_links":["https://github.com/sponsors/compwright"],"categories":[],"sub_categories":[],"readme":"# split-human-name\n\n[![Build Status](https://travis-ci.org/compwright/split-human-name.svg?branch=master)](https://travis-ci.org/compwright/split-human-name)\n[![Dependency Status](https://img.shields.io/david/compwright/split-human-name.svg?style=flat-square)](https://david-dm.org/compwright/split-human-name)\n[![Download Status](https://img.shields.io/npm/dm/split-human-name.svg?style=flat-square)](https://www.npmjs.com/package/split-human-name)\n[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor\u0026message=❤\u0026logo=GitHub\u0026link=https://github.com/sponsors/compwright)](https://github.com/sponsors/compwright)\n\nSplit a person's name into first name and last name fields\n\n## Features\n\n* Splits a name into exactly two fields `{ firstName, lastName }`\n* Fixes UPPERCASE, lowercase, iNVERSE CASE, and otherwise FUnkY cAse\n* Handles couples (\"John and Jane Doe\")\n* Gracefully degrades to put the entire string in `firstName` if there are multiple last names\n\nBased on the awesome [humanparser](https://www.npmjs.com/package/humanparser) and [namecase](https://www.npmjs.com/package/namecase) packages\n\nOnline demo: http://compwright.com/demos/split-human-name\n\n## Requirements\n\n* Node.js 10+\n\n## Installation\n\n```bash\n$ npm install --save split-human-name\n```\n\n## Usage Examples\n\n### Browser\n\n```html\n\u003cscript src=\"https://unpkg.com/split-human-name@latest/dist/split-human-name.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  console.log(window.splitHumanName('John and Jane Doe'));\n\u003c/script\u003e\n```\n\n### Node\n\n```javascript\nconst splitName = require('split-human-name');\nconst { firstName, lastName } = splitName('John and Jane Doe');\nassert.strictEquals(firstName, 'John and Jane');\nassert.strictEquals(lastName, 'Doe');\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fsplit-human-name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Fsplit-human-name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Fsplit-human-name/lists"}