{"id":719,"url":"https://github.com/bcoe/any-path","last_synced_at":"2025-03-18T13:31:24.497Z","repository":{"id":57180876,"uuid":"48304675","full_name":"bcoe/any-path","owner":"bcoe","description":":rage2: make the keys on an object path.sep agnostic.","archived":false,"fork":false,"pushed_at":"2015-12-21T03:04:44.000Z","size":11,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T10:01:04.899Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcoe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-20T02:35:23.000Z","updated_at":"2024-07-24T09:30:51.000Z","dependencies_parsed_at":"2022-09-14T03:40:27.944Z","dependency_job_id":null,"html_url":"https://github.com/bcoe/any-path","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoe%2Fany-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoe%2Fany-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoe%2Fany-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcoe%2Fany-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcoe","download_url":"https://codeload.github.com/bcoe/any-path/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933378,"owners_count":20370989,"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":[],"created_at":"2024-01-05T20:15:29.639Z","updated_at":"2025-03-18T13:31:24.191Z","avatar_url":"https://github.com/bcoe.png","language":"JavaScript","readme":"# any-path\n\n[![Build Status](https://travis-ci.org/bcoe/any-path.png)](https://travis-ci.org/bcoe/any-path)\n[![Coverage Status](https://coveralls.io/repos/bcoe/any-path/badge.svg?branch=master)](https://coveralls.io/r/bcoe/any-path?branch=master)\n[![NPM version](https://img.shields.io/npm/v/any-path.svg)](https://www.npmjs.com/package/any-path)\n\nFor when the keys in an object represent paths, and you want\nto be able to fetch them regardless of your operating system's\npreference for path separators (`\\`, `/`).\n\n```javascript\nvar assert = require('assert')\n\nvar ap = require('./')\nvar o = ap({\n  './node_modules/any-path/package.json': {name: 'any-path'}\n})\n\nassert.equal(\n  o['.\\\\node_modules\\\\any-path\\\\package.json'].name, 'any-path'\n) // lookup works \\o/\n\nassert.equal(\n  o['./node_modules/any-path/package.json'].name, 'any-path'\n) // lookup works \\o/\n\nassert.equal(\n  o['.\\\\node_modules/any-path\\\\package.json'].name, 'any-path'\n) // lookup works \\o/\n```\n\n## API\n\n### \\_\\_restore\\_\\_\n\nPut the object back into its initial state.\n\n```js\nvar o = anyPath({\n  '.\\\\foo\\\\bar\\\\README.md': {name: 'README.md'}\n})\no.__restore__().should.deep.equal({\n  '.\\\\foo\\\\bar\\\\README.md': {name: 'README.md'}\n})\n```\n\n## License\n\nISC\n","funding_links":[],"categories":["JavaScript","Libraries"],"sub_categories":["Filesystem"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoe%2Fany-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcoe%2Fany-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcoe%2Fany-path/lists"}