{"id":15226387,"url":"https://github.com/ahamed/jsphp","last_synced_at":"2025-04-09T20:30:21.512Z","repository":{"id":56942273,"uuid":"271253939","full_name":"ahamed/JsPhp","owner":"ahamed","description":"A php library for implementing Array, Object, String methods in JavaScript way.","archived":false,"fork":false,"pushed_at":"2023-08-03T11:21:42.000Z","size":248,"stargazers_count":33,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T23:57:46.985Z","etag":null,"topics":["composer","composer-package","hacktoberfest","hacktoberfest2021","php","phpcs","phpunit","unit-testing","utility-library"],"latest_commit_sha":null,"homepage":"","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/ahamed.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-10T11:03:22.000Z","updated_at":"2024-05-15T12:58:13.000Z","dependencies_parsed_at":"2024-10-12T13:01:24.357Z","dependency_job_id":null,"html_url":"https://github.com/ahamed/JsPhp","commit_stats":{"total_commits":80,"total_committers":1,"mean_commits":80.0,"dds":0.0,"last_synced_commit":"ca2cba7be902cbbfe3d708decff725fe68f63253"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamed%2FJsPhp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamed%2FJsPhp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamed%2FJsPhp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahamed%2FJsPhp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahamed","download_url":"https://codeload.github.com/ahamed/JsPhp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248107033,"owners_count":21048843,"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":["composer","composer-package","hacktoberfest","hacktoberfest2021","php","phpcs","phpunit","unit-testing","utility-library"],"created_at":"2024-09-28T20:04:55.184Z","updated_at":"2025-04-09T20:30:21.472Z","avatar_url":"https://github.com/ahamed.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![BannerWithImageAndText](https://user-images.githubusercontent.com/5783354/87884417-03402d80-ca30-11ea-8fdc-5df12ca0e0aa.png)\n\u003cbr\u003e\n\n\n![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/ahamed/JsPhp?labelColor=black\u0026color=4ec428) ![GitHub](https://img.shields.io/github/license/ahamed/JsPhp?labelColor=black\u0026color=4fc529) ![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/ahamed/JsPhp/PHP%20Composer/master?labelColor=black) ![GitHub issues](https://img.shields.io/github/issues/ahamed/JsPhp?color=c50a16\u0026labelColor=black) ![GitHub closed issues](https://img.shields.io/github/issues-closed/ahamed/JsPhp?labelColor=black) ![GitHub pull requests](https://img.shields.io/github/issues-pr/ahamed/JsPhp?color=c50a16\u0026labelColor=black) ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/ahamed/JsPhp?labelColor=black) ![GitHub language count](https://img.shields.io/github/languages/count/ahamed/JsPhp?labelColor=black) ![GitHub top language](https://img.shields.io/github/languages/top/ahamed/JsPhp?labelColor=black) ![GitHub repo size](https://img.shields.io/github/repo-size/ahamed/JsPhp?labelColor=black) ![GitHub All Releases](https://img.shields.io/github/downloads/ahamed/JsPhp/total?labelColor=black) ![GitHub contributors](https://img.shields.io/github/contributors/ahamed/JsPhp?labelColor=black) ![GitHub last commit](https://img.shields.io/github/last-commit/ahamed/JsPhp?labelColor=black) ![GitHub Release Date](https://img.shields.io/github/release-date/ahamed/JsPhp?labelColor=black) ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/ahamed/JsPhp?include_prereleases\u0026labelColor=black) ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/ahamed/JsPhp?labelColor=black)\n\n![Packagist Version](https://img.shields.io/packagist/v/ahamed/JsPhp?labelColor=black) ![Packagist Downloads](https://img.shields.io/packagist/dm/ahamed/JsPhp?color=f18d1b\u0026label=Packagist%20Downloads\u0026labelColor=black) ![Packagist Stars](https://img.shields.io/packagist/stars/ahamed/JsPhp?labelColor=black)\n\n### Why this library?\nWhile using ***php*** **Array** methods it feels troublesome because of their unstructured patterns.\n\nFor example, you are using the `array_map` and the `array_filter` methods of *php*. At the time of using, you may notice that for the `array_map` method, the `$callback` comes as the first parameter of the method, then the `$array` but for the `array_filter` method, the `$array` comes first then the `$callback`. And this mixed structure exists everywhere.\n\nThen I've discovered that the **JavaScript** uses a good pattern for these cases and I am also a big fan of JavaScript. That's why I've decided to build this library. I can say that the JavaScript lovers can get the pure feelings of JavaScript by using this and the JavaScript non-lovers also get the advantage of the good structure of **array** manipulations.\n\n### Future Journey\nCurrently I've covered only the `array` methods. In near future I will add the `object` and `string` methods.\n\n### Installation\n`composer` is needed for installing the package. If you have composer installed then run the command.\n\n```console\ncomposer require ahamed/jsphp\n```\n\n### Usage\nAfter successful installation, include the library into your project.\n\n```php\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Ahamed\\JsPhp\\JsArray;\n\n$data = [1, 2, 3, 4, 5];\n$array = new JsArray($data);\n\n$square = $array-\u003emap(\n    function ($item) {\n        return $item * $item;\n    }\n);\n\nprint_r($square);\n```\n# Documentation\n\u003e For writing this documentation I've followed the [MDN](https://developer.mozilla.org/en-US/) a lot. Thanks to **MDN**, this site helps me to learn a lot of JS.\n\nFollow the wiki pages for the details documentation.\n+ [JsArray](https://github.com/ahamed/JsPhp/wiki/JsArray)\n+ [JsObject](https://github.com/ahamed/JsPhp/wiki/JsObject)\n\n\n\n### Testing\nYou can run `PHPUnit` testing and `PHP_CodeSniffer`.\n- For running unit test\n    ```console\n    composer run-script test\n    ```\n- For running phpcs test\n    ```console\n    composer run-script phpcs\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahamed%2Fjsphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahamed%2Fjsphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahamed%2Fjsphp/lists"}