{"id":15601267,"url":"https://github.com/hacknlove/cencode","last_synced_at":"2026-06-18T07:31:13.452Z","repository":{"id":77995916,"uuid":"405619366","full_name":"hacknlove/cencode","owner":"hacknlove","description":"best url friendly serializer","archived":false,"fork":false,"pushed_at":"2026-05-29T06:40:28.000Z","size":242,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-29T08:27:59.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hacknlove.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-12T11:09:21.000Z","updated_at":"2026-05-29T06:40:33.000Z","dependencies_parsed_at":"2025-08-13T17:25:07.556Z","dependency_job_id":"002325eb-83fe-497b-bd9b-1dd5b1344c06","html_url":"https://github.com/hacknlove/cencode","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"838e98fd48172a97009e1d274118a58a3f1cdd1f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hacknlove/cencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fcencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fcencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fcencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fcencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hacknlove","download_url":"https://codeload.github.com/hacknlove/cencode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hacknlove%2Fcencode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34481220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-03T02:20:32.558Z","updated_at":"2026-06-18T07:31:13.428Z","avatar_url":"https://github.com/hacknlove.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cencode\n\n## Quick howto\n\n```\nconst { cencode, decencode } = require('cencode')\n\nconst serialized = cencode(ANYTHING)\n\nconst deserializez = decencode(serializez)\n```\n\n## Extend\n\nIt's possible to enable custom object serialization by using plugins.\n\nLet's see how to add a plugin to serialize/deserialize Urls\n\n```\nconst { cencode, pluginsEncode, decencode, pluginsDecode } = require('./')\n\npluginsEncode.push({ name: 'URL', match: x =\u003e x instanceof URL, values: x =\u003e [x.toString()] })\npluginsDecode.URL = x =\u003e new URL(x)\nconst serialized = cencode(['foo', 12, new URL('https://example.com')])\n// -\u003e '_JfooxC)JURLhKhttps://example.com/'\n\n```\n\n## Sign / verify\n\nThe `sign` and `verify` function accepts as its second parameter a callback function to add a signature and verify it.\n\n```\nconst { sign, verify } = require('./')\nconst kissmyhash = require('kissmyhash')\n\nconst signit = (data) =\u003e kissmyhash([data, 'SALT'])\nconst verifyit = (signature, data) =\u003e kissmyhash(data, 'SALT') === signature ? data : false\n\nconst signed = sign(['foo', { bar: 42 }], signit)\n\nconst original = verify(signed, verifyit)\n// -\u003e ['foo', { bar: 42 }]\n```\n\n# cencode\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fcencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhacknlove%2Fcencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhacknlove%2Fcencode/lists"}