{"id":21067176,"url":"https://github.com/idf/commons-util-js","last_synced_at":"2026-03-19T18:42:53.783Z","repository":{"id":26714649,"uuid":"30171980","full_name":"idf/commons-util-js","owner":"idf","description":"Common utilities for JavaScript","archived":false,"fork":false,"pushed_at":"2016-07-22T23:41:32.000Z","size":115,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-25T02:04:50.949Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/idf.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}},"created_at":"2015-02-02T05:04:30.000Z","updated_at":"2023-03-10T09:41:21.000Z","dependencies_parsed_at":"2022-08-19T08:00:26.714Z","dependency_job_id":null,"html_url":"https://github.com/idf/commons-util-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idf/commons-util-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fcommons-util-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fcommons-util-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fcommons-util-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fcommons-util-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idf","download_url":"https://codeload.github.com/idf/commons-util-js/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idf%2Fcommons-util-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"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-19T18:04:54.532Z","updated_at":"2026-03-01T05:01:58.764Z","avatar_url":"https://github.com/idf.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Common JavaScript Utils() {\nCommon utilities for JavaScript.  \nThis is Noah's Ark for [Atwood's Law](http://blog.codinghorror.com/the-principle-of-least-power/): \"any application that can be written in JavaScript, will eventually be written in JavaScript.\" :joy:\n\n##Installations\n### As Git Subtree\n```\ngit remote add -f util-js git@github.com:idf/commons-util-js.git\ngit subtree add --prefix [dir/]util-js util-js develop --squash\ngit subtree pull --prefix [dir/]util-js util-js develop --squash\ngit subtree push --prefix [dir/]util-js util-js develop \n```\n###Common Utils for Everything\n```html\n\u003cscript type=\"text/javascript\" src=\"/js/commons-util-js/DomUtils.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"text/javascript\" src=\"/js/commons-util-js/PrimitiveExtensions.js\"\u003e\u003c/script\u003e\n```\n####Dependencies\n* JQuery\n* JQuery-UI\n\n###Common Utils for AngularJS\n```html\n\u003cscript type=\"text/javascript\" src=\"/js/commons-util-js/angularjs/filters.js\"\u003e\u003c/script\u003e\n```\n####Dependencies\n* AngularJS\n\n##Friends\n* [JSHint](http://jshint.com/) for code quality.\n* [Bower](http://bower.io/) for package management.\n\n###JSHint\nJetBrains configuration - opt for using config files `.jshintrc`.\n\n##Best Practice for JS Folder Structure\n[ref](http://requirejs.org/docs/api.html)\n```\nwww/\n    index.html\n    js/\n        app/\n            sub.js\n        lib/\n            jquery.js\n            canvas.js\n        app.js\n        require.js\n```\n\n## Immediately Invoked Function Expression (IIFE)\n```javascript\n(function(){\n  /* code */\n}());\n\n// And that's the way if some parameters shall be passed\n(function(a, b){\n  /* code */\n})(arg1, arg2); //arg1 -\u003e a; arg2 -\u003e b\n```\n## Functions\n* Prefer function delectation than anonymous function (function expression), because of facilitation of hoisting.\n* Prefer anonymous function to be one-line.\n\n##CSS/JS Dependencies\nDo not commit 3rd party/ventor CSS/JS. Use bower.json to update dependencies instead\nInitialize bower\n```bash\nbower init\n```\nUpdate dependencies:\n```bash\nbower update\n```\n\n# };\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidf%2Fcommons-util-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidf%2Fcommons-util-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidf%2Fcommons-util-js/lists"}