{"id":19315399,"url":"https://github.com/thatisuday/utf-info","last_synced_at":"2025-02-24T04:26:20.761Z","repository":{"id":44215300,"uuid":"221480936","full_name":"thatisuday/utf-info","owner":"thatisuday","description":"Get encoding information of a character in UTF-8, UTF-16 and UTF-32 encodings.","archived":false,"fork":false,"pushed_at":"2022-12-30T19:04:48.000Z","size":77,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T08:48:24.303Z","etag":null,"topics":["decoder","encoding","encodings","unicode","utf","utf-16","utf-32","utf-8"],"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/thatisuday.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}},"created_at":"2019-11-13T14:42:06.000Z","updated_at":"2020-04-17T21:10:47.000Z","dependencies_parsed_at":"2023-01-31T14:00:35.686Z","dependency_job_id":null,"html_url":"https://github.com/thatisuday/utf-info","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatisuday%2Futf-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatisuday%2Futf-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatisuday%2Futf-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thatisuday%2Futf-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thatisuday","download_url":"https://codeload.github.com/thatisuday/utf-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240417004,"owners_count":19797923,"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":["decoder","encoding","encodings","unicode","utf","utf-16","utf-32","utf-8"],"created_at":"2024-11-10T01:06:48.852Z","updated_at":"2025-02-24T04:26:20.720Z","avatar_url":"https://github.com/thatisuday.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# utf-info (Unicode Character Information)\nGet encoding information of a character in UTF-8, UTF-16 and UTF-32 encodings.\n\n[![npm-version](https://img.shields.io/npm/v/utf-info?style=flat-square)](https://www.npmjs.com/package/utf-info)\n[![dependencies](https://img.shields.io/david/thatisuday/utf-info?style=flat-square)](https://www.npmjs.com/package/utf-info)\n[![downloads](https://img.shields.io/npm/dt/utf-info?style=flat-square)](https://www.npmjs.com/package/utf-info)\n[![license](https://img.shields.io/npm/l/utf-info?style=flat-square)](https://www.npmjs.com/package/utf-info)\n\n## Install\n```js\nnpm install -S utf-info\n```\n\n## Use\n```js\nconst utfInfo = require( 'utf-info' );\n\n// syntax:\nutfInfo( character, encoding );\n// character =\u003e single Unicode character (string)\n// encoding =\u003e valid UTF encoding (string) viz. utf-8, utf-16, and utf-32\n\n// examples:\nconst result = utfInfo( '😊' ); // character `😊`\n// const result = utfInfo( '\\x41', 'utf-8' ); // '\\x41' is ASCII escape character `A`\n// const result = utfInfo( '\\u0906', 'utf-16' ); // '\\u0906' is Unicode escape for character `आ`\n\n/**************\nresult =\u003e {\n    character: '😊',\n    codePoint: {\n        dec: 128522,\n        hex: '01F60A',\n        bits: 20\n    },\n    codeUnits: {\n        count: '2',\n        dec: [55357, 56842],\n        binary: ['1101100000111101', '1101111000001010'],\n        hex: ['D83D', 'DE0A'],\n        escape: { ascii: null, unicode: '\\\\uD83D\\\\uDE0A' }\n    }\n}\n**************/\n```\n\n\n## Run test\n```\ncd /repo/utf-info/\nnpm run test\n\nfn:utfInfo suit\n    ✓ should return 0041 code point for the character A\n    ✓ should return 0906 code point for the character आ\n    ✓ should return `[\"D83D\", \"DE0A\"]` UTF-16 code units for the character 😊\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatisuday%2Futf-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthatisuday%2Futf-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthatisuday%2Futf-info/lists"}