{"id":20694941,"url":"https://github.com/heedrox/string-calculator-js","last_synced_at":"2026-04-19T18:31:10.488Z","repository":{"id":80788260,"uuid":"98907488","full_name":"heedrox/string-calculator-js","owner":"heedrox","description":"String Calculator kata with Javascript","archived":false,"fork":false,"pushed_at":"2017-08-01T11:23:08.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T02:33:35.137Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heedrox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-07-31T16:06:49.000Z","updated_at":"2017-07-31T16:10:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"0956a741-162f-48cb-8e36-b5abc40abc36","html_url":"https://github.com/heedrox/string-calculator-js","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/heedrox/string-calculator-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fstring-calculator-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fstring-calculator-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fstring-calculator-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fstring-calculator-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heedrox","download_url":"https://codeload.github.com/heedrox/string-calculator-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heedrox%2Fstring-calculator-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32017769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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-17T00:07:21.375Z","updated_at":"2026-04-19T18:31:10.466Z","avatar_url":"https://github.com/heedrox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Calculator (functional js)\n\nThis repo practices the String Calculator with functional javascript based on :\n\nhttp://osherove.com/tdd-kata-1/\n\nIt practices and uses concepts from @ggalmazor \ntwitch at: https://www.twitch.tv/videos/157749121\n\nI saw the video time ago, and now I'm trying to do it myself. Where will I get?\n\n---\n\nWhy I do this:\n\nBecause I think I know things only when hearing them. But unless I practice them, I do not retain them.\n \nAs Confucio says:\n\n_Oigo y olvido. \nVeo y recuerdo. \nHago y entiendo_\n\n---\n\nWhat I did at this point:\n\n- I first saw the video about 2-3 weeks ago.\n- I just did the kata myself. I know I have some things I am not applying from the video, and I haven't tried. I will try to apply them after this commit. =\u003e v1.0\n- I applied the concept of \"pipes\" =\u003e https://vanslaars.io/post/create-pipe-function/ =\u003e I realize that there is this little extra effort I cannot apply because of checkNegatives =\u003e v2.0\n- I check twich video to check how to pipe the checkNegative function (I remember something about R having this)\n- I applied the R.tap function =\u003e v3.0\n- I exported the original class as a function =\u003e v4.0\n- After @artolamola insight (https://twitter.com/artolamola/status/892090041396342784) =\u003e some major refactoring =\u003e v5.0\n\n\n---\n\nThings I learnt / reflected on through this kata:\n\n- importing R into your project (ramdajs)\n- pipe function. What its use. When to use.\n- R.tap function. - http://ramdajs.com/docs/#tap\n- functional programming means exporting functions. Not classes :)\n- If not reusing, group functions and dont expose\n- Make your functions in your \"class\" as specific to your domain as possible. Think about tinier common functions as horizontals, and include them from the class. (Thanks @artolamola - https://twitter.com/artolamola/status/892090041396342784)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheedrox%2Fstring-calculator-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheedrox%2Fstring-calculator-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheedrox%2Fstring-calculator-js/lists"}