{"id":18474277,"url":"https://github.com/dimimikadze/vanilla-helpers","last_synced_at":"2025-04-08T12:32:10.606Z","repository":{"id":35266683,"uuid":"39526858","full_name":"DimiMikadze/vanilla-helpers","owner":"DimiMikadze","description":"Vanilla Javascript Helper Functions, Ajax, Effects, DOM manipulation, Styles, Utilities","archived":false,"fork":false,"pushed_at":"2015-08-06T13:37:45.000Z","size":170,"stargazers_count":34,"open_issues_count":0,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-23T12:41:27.416Z","etag":null,"topics":["javascript"],"latest_commit_sha":null,"homepage":"","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/DimiMikadze.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-07-22T19:47:17.000Z","updated_at":"2023-05-07T19:45:27.000Z","dependencies_parsed_at":"2022-09-06T03:31:51.170Z","dependency_job_id":null,"html_url":"https://github.com/DimiMikadze/vanilla-helpers","commit_stats":null,"previous_names":["dimitrimikadze/vanilla-helpers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimiMikadze%2Fvanilla-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimiMikadze%2Fvanilla-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimiMikadze%2Fvanilla-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DimiMikadze%2Fvanilla-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DimiMikadze","download_url":"https://codeload.github.com/DimiMikadze/vanilla-helpers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247842745,"owners_count":21005340,"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":["javascript"],"created_at":"2024-11-06T10:28:53.325Z","updated_at":"2025-04-08T12:32:10.304Z","avatar_url":"https://github.com/DimiMikadze.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vanilla Javascript Helper Functions, Ajax, Effects, DOM manipulation, Styles, Utilities, Without jQuery. \n\nEasy to use Vanilla Javascript Helper Functions Collection, Ajax, Effects, DOM manipulation, Styles, Utilities ...\n\n## Features\n\n- Lightweight, No libraries required\n- Ajax\n- Effects\n- DOM manipulation \n- Styles\n- Utilities\n\n## Bower\n\n````\nbower install vanilla-helpers\n````\n\n## Getting Started\n\ninclude js/vanillaHelpers.js OR js/vanillaHelpers.min.js\n\n## Example Ajax GET\n\n````\nvanillaHelpers.ajaxGet('http://example.com/fa=foo\u0026foo=faa', function(data) {\n\tconsole.log(data);\n});\n````\n\nIf server returns json, parse it in callback function\n\n````\nvanillaHelpers.ajaxGet('http://example.com/fa=foo\u0026foo=faa', function(data) {\n\tconsole.log(JSON.parse(data));\n});\n````\n\n## Example Ajax Post\n\n````\nvanillaHelpers.ajaxPost('http://example.com/', 'a=b\u0026b=c', function(data) {\n\tconsole.log(data);\n});\n````\n\nYou can also pass object as data\n\n````\nvanillaHelpers.ajaxPost('http://example.com/', { a: 'b', b: 'c' }, function(data) {\n\tconsole.log(data);\n});\n````\n\n## Fade In\n\n````\nvanillaHelpers.fadeIn(document.getElementById('test'), 3000);\n\n````\n\nWith Callback\n\n````\nvanillaHelpers.fadeIn(document.getElementById('test'), 3000, function() {\n\tconsole.log('animation stopped');\n});\n\n````\n\n## Fade Out\n\n````\nvanillaHelpers.fadeOut(document.getElementById('test'), 3000);\n\n````\n\nWith Callback\n\n````\nvanillaHelpers.fadeOut(document.getElementById('test'), 3000, function() {\n\tconsole.log('animation stopped');\n});\n\n````\n\n## Next Element\n\n````\nvanillaHelpers.nextElement(document.getElementById('test'));\n````\n\n## Previous Element\n\n````\nvanillaHelpers.previousElement(document.getElementById('test'));\n````\n\n## Browser Vendor Properties\n\n````\nvanillaHelpers.setVendor(document.getElementById('test'), 'Transition', '1s');\n\n````\n\nWill add next styles\n\n````\n-webkit-transition: 1s;\n   -moz-transition: 1s;\n    -ms-transition: 1s;\n     -o-transition: 1s;\n        transition: 1s;\n````\n\n## Generate random integer\n\n````\nvanillaHelpers.randomInt(1, 10);\n````\n\n## Get Current url segment\n\nif url is: http://example.com/faa/foo/boo\n\n````\nvanillaHelpers.urlSegment(2);\n````\n\nWill return foo\n\n## Check if element has specific class\n\n````\nvanillaHelpers.hasCls(document.getElementById('test'), 'foo');\n````\n\n## Add Class\n\n````\nvanillaHelpers.addCls(document.getElementById('test'), 'foo');\n````\n\n## Remove Class\n\n````\nvanillaHelpers.removeCls(document.getElementById('test'), 'foo');\n````\n\n## Toggle Class\n\n````\nvanillaHelpers.toggleCls(document.getElementById('test'), 'foo');\n````\n\n## Matches\n\n````\nvanillaHelpers.matches(document.getElementById('selector'), '#selector');\n````\n\n## String Starts With\n\n````\nvanillaHelpers.startsWith('SomeRandomText', 'Some');\n````\n\n## String Ends With\n\n````\nvanillaHelpers.endsWith('SomeRandomText', 'Some');\n````\n\n## String Between two characters\n\n````\nvanillaHelpers.stringBetween('SomeRandomText', 'R', 'T');\n````\n\n## In Array\n\n````\nvanillaHelpers.inArray(['a', 'b', 'c', 'd'], 'c');\n````\n\n## Contributing\n\ncontributions are more than welcome!\n\n## License\n\nSee license.txt","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimimikadze%2Fvanilla-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimimikadze%2Fvanilla-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimimikadze%2Fvanilla-helpers/lists"}