{"id":15492136,"url":"https://github.com/imjuni/stringaccess","last_synced_at":"2025-04-05T07:11:55.030Z","repository":{"id":57372647,"uuid":"58743686","full_name":"imjuni/stringaccess","owner":"imjuni","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-18T04:40:49.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-19T10:27:11.020Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imjuni.png","metadata":{"files":{"readme":"README.md","changelog":"history.md","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":"2016-05-13T13:40:34.000Z","updated_at":"2016-05-15T10:51:49.000Z","dependencies_parsed_at":"2022-09-19T18:52:40.294Z","dependency_job_id":null,"html_url":"https://github.com/imjuni/stringaccess","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/imjuni%2Fstringaccess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjuni%2Fstringaccess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjuni%2Fstringaccess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imjuni%2Fstringaccess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imjuni","download_url":"https://codeload.github.com/imjuni/stringaccess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299850,"owners_count":20916193,"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-10-02T07:58:59.887Z","updated_at":"2025-04-05T07:11:55.002Z","avatar_url":"https://github.com/imjuni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"StringAccess\n============\n\nString Access is a import, export library using by dot-notation string. See below.\n\n# Exporter\n\n```js\nvar sa = require('stringaccess')();\nvar superheros = {\n  ironman: {\n    name: 'Tony Stark',\n    indivisual: {\n      species: 'Human',\n      placeOfOrigin: 'Earth',\n      partnerships: 'War Machine'\n    }\n  },\n  thor: {\n    name: 'Thor Odinson',\n    indivisual: {\n      species: 'Asgardian',\n      placeOfOrigin: 'Asgard'\n    }\n  }\n};\n\nconsole.log(sa.exporter(superheros, 'ironman.name'));\n\n# shell output\nTony Stark\n```\n\n# Importer\n\n```js\nvar sa = require('stringaccess')();\nvar superheros = {\n  ironman: {\n    name: 'Tony Stark',\n    indivisual: {\n      species: 'Human',\n      placeOfOrigin: 'Earth',\n      partnerships: 'War Machine'\n    }\n  },\n  thor: {\n    name: 'Thor Odinson',\n    indivisual: {\n      species: 'Asgardian',\n      placeOfOrigin: 'Asgard'\n    }\n  }\n};\n\nsa.importer(superheros, 'hulk', { \n  name: 'Robert Bruce Banne',\n});\n\nsa = require('../lib/StringAccess')({ isCreate: true });   // isCreate options is create object on blank path\nsa.importer(superheros, 'hulk.indivisual.species', 'Unknown');\n\nconsole.log(superheros.hulk.name);\nconsole.log(superheros.hulk.indivisual.species);\n\n# shell output\nRobert Bruce Banne\nUnknown\n```\n\n# Options\n* isCreate: Create object on blank path\n* isAssign: Path is point to object this time replace it. But isAssign is true, assign it. See test/sa.js in StringAccess_importer_object test.\n\nIf you need more example, see test/sa.js.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjuni%2Fstringaccess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimjuni%2Fstringaccess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimjuni%2Fstringaccess/lists"}