{"id":21026031,"url":"https://github.com/burntcaramel/lofi-js","last_synced_at":"2025-05-15T10:31:19.388Z","repository":{"id":86336189,"uuid":"78526275","full_name":"BurntCaramel/lofi-js","owner":"BurntCaramel","description":"Format rich content using #hashtags and @mentions","archived":false,"fork":false,"pushed_at":"2017-02-08T12:27:23.000Z","size":34,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T20:44:34.027Z","etag":null,"topics":["content","javascript","nodejs","parser","text","text-formatting"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BurntCaramel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-01-10T11:13:48.000Z","updated_at":"2019-12-28T21:50:36.000Z","dependencies_parsed_at":"2023-05-31T12:41:41.933Z","dependency_job_id":null,"html_url":"https://github.com/BurntCaramel/lofi-js","commit_stats":null,"previous_names":["royalicing/lofi-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntCaramel%2Flofi-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntCaramel%2Flofi-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntCaramel%2Flofi-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BurntCaramel%2Flofi-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BurntCaramel","download_url":"https://codeload.github.com/BurntCaramel/lofi-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254322827,"owners_count":22051673,"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":["content","javascript","nodejs","parser","text","text-formatting"],"created_at":"2024-11-19T11:41:15.096Z","updated_at":"2025-05-15T10:31:19.377Z","avatar_url":"https://github.com/BurntCaramel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lofi · JavaScript\n\n## Installation\n\n```\nnpm install lofi --save\n```\n\n## API Docs\n\n### parseElement(input: String)\n\nElement:\n- texts: [ String ] · Array of plain text input\n- mentions: [ [ String ] ] · Array of key paths\n- tags: { String: Boolean | { texts: [ String ] , mentions: [ [ String ] ] } } · Key-value pairs of booleans or strings\n- children: [ Element ] · Array of children elements\n\n```js\nparseElement('Click me #button #primary')\n/* =\u003e {\n  texts: ['Click me'],\n  mentions: [null],\n  tags: { button: true, primary: true },\n  children: []\n} */\n\nparseElement('Hello @first-name, how are you?')\n/* =\u003e {\n  texts: ['Hello ', ', how are you?'],\n  mentions: [['first-name'], null],\n  tags: {},\n  children: []\n} */\n```\n\n## Demos\n\n- [Interactive demo of parseElement](http://codepen.io/burntcaramel/pen/apaKVL?editors=0010)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburntcaramel%2Flofi-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburntcaramel%2Flofi-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburntcaramel%2Flofi-js/lists"}