{"id":15454718,"url":"https://github.com/2anki/get-notion-object-title","last_synced_at":"2025-06-21T21:03:45.613Z","repository":{"id":180973258,"uuid":"666005092","full_name":"2anki/get-notion-object-title","owner":"2anki","description":"get human readable names from Notion objects","archived":false,"fork":false,"pushed_at":"2025-03-03T11:12:32.000Z","size":544,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-27T03:19:58.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/2anki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2023-07-13T13:39:52.000Z","updated_at":"2024-12-08T05:10:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1dcefff-152e-4b23-b45a-c543a7552d6d","html_url":"https://github.com/2anki/get-notion-object-title","commit_stats":{"total_commits":72,"total_committers":2,"mean_commits":36.0,"dds":"0.26388888888888884","last_synced_commit":"f5a0fbbd212644e55a2d120adbe73de54819cf40"},"previous_names":["2anki/get-notion-object-title"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/2anki/get-notion-object-title","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2anki%2Fget-notion-object-title","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2anki%2Fget-notion-object-title/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2anki%2Fget-notion-object-title/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2anki%2Fget-notion-object-title/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2anki","download_url":"https://codeload.github.com/2anki/get-notion-object-title/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2anki%2Fget-notion-object-title/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261193089,"owners_count":23122904,"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-10-01T22:05:02.294Z","updated_at":"2025-06-21T21:03:40.598Z","avatar_url":"https://github.com/2anki.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Notion Object Title\n\nThe [Notion API](https://developers.notion.com/reference/intro) does not provide a simple way to retrieve the title of an object.\nThis module provides you with a simple API where you can pass in a Notion Object\nand receive a human readable string.\n\n## Install\n\n\u003e npm i get-notion-object-title\n\n## Usage\n\n```typescript\nimport getNotionObjectTitle from 'get-notion-object-title';\n\ngetNotionObjectTitle(yourBlock); // returns \"Human readable block title\"\n```\n\n### Disable emoji\n\nIf you already have a way to handle icons and would like to only get the text, you can\ndisable the emojis by passing in an option.\n\n```typescript\ngetNotionObjectTitle(yourBlock, { emoji: false }); // returns \"Human readable block title\"\n```\n\n## How does it work?\n\nThe `getNotionObjectTitle` takes a Notion object as input and returns a string.\nDepending on the type of the object there are some rules that are applied.\n\n### Page\n\nIf the [page](https://developers.notion.com/reference/page) has any of the following properties they will be used and they do exclude each other:\n\n- Title\n- Page\n- Name\n\n### Database\n\nThe [database](https://developers.notion.com/reference/database) uses the top level `title` attribute.\n\n### Other\n\nThe remaining blocks are converted to plain text using the [rich text items](https://developers.notion.com/reference/rich-text).\n\n## License\n\nUnless otherwise specified in the source:\n\nThe code is licensed under the [MIT](./LICENSE) Copyright (c) 2023, Alexander Alemayhu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2anki%2Fget-notion-object-title","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2anki%2Fget-notion-object-title","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2anki%2Fget-notion-object-title/lists"}