{"id":31908320,"url":"https://github.com/enzyme/freckle","last_synced_at":"2025-10-13T15:27:01.945Z","repository":{"id":56978270,"uuid":"55327069","full_name":"enzyme/freckle","owner":"enzyme","description":"A collection of dot-based information retrieval helpers... wuh?","archived":false,"fork":false,"pushed_at":"2016-04-03T05:53:36.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-14T18:54:52.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/enzyme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-03T03:04:50.000Z","updated_at":"2016-07-08T20:38:55.000Z","dependencies_parsed_at":"2022-08-21T11:50:35.593Z","dependency_job_id":null,"html_url":"https://github.com/enzyme/freckle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/enzyme/freckle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzyme%2Ffreckle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzyme%2Ffreckle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzyme%2Ffreckle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzyme%2Ffreckle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enzyme","download_url":"https://codeload.github.com/enzyme/freckle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enzyme%2Ffreckle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015922,"owners_count":26085778,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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":"2025-10-13T15:26:53.492Z","updated_at":"2025-10-13T15:27:01.940Z","avatar_url":"https://github.com/enzyme.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://cloud.githubusercontent.com/assets/2805249/14230969/0916d2f6-f9b3-11e5-8e30-864a599f2e2d.png\" width=\"200\"\u003e\n\n[![Build Status](https://travis-ci.org/enzyme/freckle.svg?branch=master)](https://travis-ci.org/enzyme/freckle)\n[![Coverage Status](https://coveralls.io/repos/enzyme/freckle/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/enzyme/freckle?branch=master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/enzyme/freckle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/enzyme/freckle/?branch=master)\n\nFreckle is a collection of information accessors. It allows you to traverse and get the values in arrays and other collection types using dot separated paths. For example, getting the value in a multi-dimensional-associative array for `users.bob456.name`, given the array:\n\n```php\n$array = [\n    'users' =\u003e [\n        'jane123' =\u003e ['name' =\u003e 'Jane Foo'],\n        'bob456'  =\u003e ['name' =\u003e 'Bob Foo'],\n    ]\n];\n```\n\nwould return the value of `Bob Foo`. Pretty straight forward hey?\n\n# Installation\n\n```bash\ncomposer require enzyme/freckle\n```\n\n# Usage\n\nGetting a value from a simple collection.\n\n```php\nuse Enzyme\\Freckle\\Dot;\n\n$array = [\n    'users' =\u003e [\n        'jane123' =\u003e ['name' =\u003e 'Jane Foo'],\n        'bob456'  =\u003e ['name' =\u003e 'Bob Foo'],\n    ]\n];\n\n$dot = new Dot;\n$full_name = $dot-\u003eget($array, 'users.bob456.name'); // returns \"Bob Foo\".\n```\n\nGetting a value from a simple collection with numeric keys.\n\n```php\nuse Enzyme\\Freckle\\Dot;\n\n$array = [\n    'users' =\u003e [\n        0 =\u003e [\n            'jane123' =\u003e ['name' =\u003e 'Jane Foo'],\n        ],\n        1 =\u003e [\n            'bob456'  =\u003e ['name' =\u003e 'Bob Foo'],\n        ]\n    ]\n];\n\n$dot = new Dot;\n$full_name = $dot-\u003eget($array, 'users.bob456.name'); // returns \"Bob Foo\".\n```\n\nIn the event that a collection has numeric keys or supports multiple entries with the same key name, only the first result found will ever be returned.\n\nIf no value can be found, `null` will be returned instead. **Be careful though** if you're checking against the null value for success as you may get false positives if an actual value was found, but that value happens to be `null`.\n\n# Contributing\n\nPlease see `CONTRIBUTING.md`\n\n# License\n\nMIT - Copyright (c) 2015 Tristan Strathearn, see `LICENSE`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenzyme%2Ffreckle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenzyme%2Ffreckle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenzyme%2Ffreckle/lists"}