{"id":16406463,"url":"https://github.com/wincent/unpack-content","last_synced_at":"2026-02-10T13:32:25.753Z","repository":{"id":57386774,"uuid":"52069905","full_name":"wincent/unpack-content","owner":"wincent","description":"🗃 Extract header data and body from plaintext (Markdown-ish) markup source","archived":false,"fork":false,"pushed_at":"2025-01-24T10:07:19.000Z","size":98,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T01:04:42.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/wincent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2016-02-19T07:32:01.000Z","updated_at":"2022-08-20T03:48:27.000Z","dependencies_parsed_at":"2025-02-23T21:25:57.715Z","dependency_job_id":"cd8d24a8-38f2-489e-b787-c8c03078dba9","html_url":"https://github.com/wincent/unpack-content","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wincent/unpack-content","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Funpack-content","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Funpack-content/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Funpack-content/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Funpack-content/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wincent","download_url":"https://codeload.github.com/wincent/unpack-content/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wincent%2Funpack-content/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29300646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T12:55:56.056Z","status":"ssl_error","status_checked_at":"2026-02-10T12:55:55.692Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11T06:09:51.165Z","updated_at":"2026-02-10T13:32:25.737Z","avatar_url":"https://github.com/wincent.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unpack-content\n\nExtract header data and body from plaintext (Markdown-ish) markup source.\n\n## Install\n\n```sh\n$ npm install --save unpack-content\n```\n\n## Usage\n\nGiven content in file `content.md`:\n\n```\n---\ntags: foo bar baz\n---\n\n# Content\n\nHi there!\n```\n\nUnpack the metadata from the rest using:\n\n```js\nimport fs from 'fs';\nimport unpackContent from 'unpack-content';\n\nconst contentString = fs.readFileSync('content.md').toString();\nconst {body, tags, ...metadata} = unpackContent(contentString);\n```\n\n## Development\n\n### Interesting `gulp` targets\n\n- `flow`: Check types.\n- `lint`: Run linter.\n- `test`: Run tests.\n- `babel`: Transform ES2015 JS (in `src/`) to ES5 (in `dist/`).\n- `build`: All of the above.\n\n## Links\n\n- Source: [github.com/wincent/unpack-content](https://github.com/wincent/unpack-content)\n- Package: [www.npmjs.com/package/unpack-content](https://www.npmjs.com/package/unpack-content)\n\n## License\n\n### The MIT License (MIT)\n\nCopyright (c) 2015-present Greg Hurrell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Funpack-content","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwincent%2Funpack-content","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwincent%2Funpack-content/lists"}