{"id":19777514,"url":"https://github.com/ilib-js/ilib-casemapper","last_synced_at":"2026-06-09T06:31:34.509Z","repository":{"id":191782577,"uuid":"635104831","full_name":"iLib-js/ilib-casemapper","owner":"iLib-js","description":"Map a string to upper- or lower-case locale-sensitively","archived":false,"fork":false,"pushed_at":"2024-01-25T16:18:07.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-03-26T17:21:46.114Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iLib-js.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}},"created_at":"2023-05-02T01:21:47.000Z","updated_at":"2023-09-22T16:23:50.000Z","dependencies_parsed_at":"2024-01-25T05:32:02.402Z","dependency_job_id":"fda70b6b-35cc-4162-aa90-7ac1250e6b80","html_url":"https://github.com/iLib-js/ilib-casemapper","commit_stats":null,"previous_names":["ilib-js/ilib-casemapper"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/iLib-js/ilib-casemapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-casemapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-casemapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-casemapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-casemapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iLib-js","download_url":"https://codeload.github.com/iLib-js/ilib-casemapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-casemapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34095243,"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-09T02:00:06.510Z","response_time":63,"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-11-12T05:25:21.751Z","updated_at":"2026-06-09T06:31:34.487Z","avatar_url":"https://github.com/iLib-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e :warning: **Deprecation Notice** :warning:\n\u003e This repository has been deprecated. Please use the corresponding package from the [iLib-js monorepo](https://github.com/iLib-js/ilib-mono) instead.\n\n# ilib-casemapper\n\nMap a string to upper- or lower-case locale-sensitively.\n\nMany people don't realize that case mapping is a locale-sensitive\noperation. The fact is, what the upper-case version of a particular letter\nis depends on who you ask!\n\n## Installation\n\n```\nnpm install ilib-casemapper\n\nor\n\nyarn add ilib-casemapper\n```\n\n## Upper- or Lower-casing a Letter\n\nTo map the case of a letter, you first create an instance of the CaseMapper\nclass. By default, this will use the mappings for English.\n\nHere is how you would map a letter using the Turkish rules:\n\n```javascript\nES2015:\n\nvar CaseMapper = require(\"ilib-casemapper\");\nvar cm = new CaseMapper({locale: \"tr-TR\"});\n\nvar upper = cm.map('i'); // \"upper\" should now contain \"İ\"\n\nES6:\n\nimport CaseMapper from \"ilib-casemapper\";\nconst cm = new CaseMapper({locale: \"tr-TR\"});\n\nconst upper = cm.map('i'); // \"upper\" should now contain \"İ\"\n```\n\nIn general, you should be able to use the case mapper in older Javascript\nengines by requiring it, or in modern Javascript engines by\nimporting it. The package was built to be able to support both. From here\non, we will only give modern JS examples.\n\nHere is how you use the case mapper to lower:\n\n```javascript\nimport CaseMapper from \"ilib-casemapper\";\nconst cm = new CaseMapper({\n    locale: \"tr-TR\",\n    direction: \"lower\"\n});\n\nconst upper = cm.map('İ'); // \"upper\" should now contain \"i\"\n```\n\nFull documentation: [CaseMapper class](./docs/CaseMapper.md)\n\n\n# License\n\nCopyright © 2023, JEDLSoft\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n# Release Notes\n\n### v1.0.0\n\n- Code taken from ilib 14.19.0 and converted to an ES6 module.\n- Use babel to transpile it back to ES2015 so it can be used in either ES215 or\n  ES6 code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-casemapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filib-js%2Filib-casemapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-casemapper/lists"}