{"id":13533638,"url":"https://github.com/gunar/js-transforms","last_synced_at":"2025-06-13T08:06:44.187Z","repository":{"id":97709606,"uuid":"59320568","full_name":"gunar/js-transforms","owner":"gunar","description":"Codemod to replace lodash for lodash/fp","archived":false,"fork":false,"pushed_at":"2016-05-24T13:33:35.000Z","size":14,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T16:09:40.227Z","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/gunar.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}},"created_at":"2016-05-20T19:22:05.000Z","updated_at":"2022-07-22T00:21:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8d0ff10-f8b7-497c-b646-a291f1aea19e","html_url":"https://github.com/gunar/js-transforms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gunar/js-transforms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fjs-transforms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fjs-transforms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fjs-transforms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fjs-transforms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunar","download_url":"https://codeload.github.com/gunar/js-transforms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunar%2Fjs-transforms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606966,"owners_count":22883559,"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":[],"created_at":"2024-08-01T07:01:21.679Z","updated_at":"2025-06-13T08:06:44.150Z","avatar_url":"https://github.com/gunar.png","language":"JavaScript","funding_links":[],"categories":["Libraries"],"sub_categories":["Lodash"],"readme":"# My jscodeshift transforms\n\nA collection of js transforms using [js-codeshift](https://github.com/facebook/jscodeshift).\n\n## Usage\n\n```\nnpm install -g jscodeshift\njscodeshift -t \u003ctransform.js\u003e \u003cfile.js\u003e\n```\n\n## Transforms\n\n### [lodash-to-fp.js](lodash-to-fp.js)\n\nIt helps you refactor a codebase from lodash to lodash/fp. It assumes that you're using `_ = require('lodash')` and returns `fp = require('lodash/fp')`.\n\nThere's lots of room for improvement. That's why I'm assigning to the variable `fp`, so it's easier to fix conflicts. Then afterwards you can easily \"find and replace\" `fp -\u003e _`.\n\nThis scripts takes a \"better safe than sorry\" approach, as to try to minimize false positives.\n e.g. `_.mapValues(myValues, myFunctions)` doesn't get converted because I'd need to confirm [myFunction's arity](https://github.com/lodash/lodash/wiki/FP-Guide#fixed-arity)\n\n### [fp-to-_.js](fp-to-_.js)\n\nIt's intended to be used as a final step when converting a codebase from `lodash` to `lodash/fp`.\n\nThe transform above (`lodash-to-fp`) uses `fp` as an identifier, to allow you to manually fix conflicts.\nThis transform simply replaces the identifier `fp` for `_` everywhere.\n\n\n## License\n\nMIT [http://gunar.mit-license.org]()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunar%2Fjs-transforms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunar%2Fjs-transforms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunar%2Fjs-transforms/lists"}