{"id":15578180,"url":"https://github.com/js-sdk/js-sdk-objects","last_synced_at":"2025-03-29T07:27:07.130Z","repository":{"id":57283612,"uuid":"103591127","full_name":"js-sdk/js-sdk-objects","owner":"js-sdk","description":"Simple object utilities.","archived":false,"fork":false,"pushed_at":"2017-09-14T23:32:58.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T02:25:56.138Z","etag":null,"topics":["javascript","library","objects"],"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/js-sdk.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-14T23:17:39.000Z","updated_at":"2017-09-15T00:41:28.000Z","dependencies_parsed_at":"2022-09-04T18:53:12.386Z","dependency_job_id":null,"html_url":"https://github.com/js-sdk/js-sdk-objects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-sdk%2Fjs-sdk-objects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-sdk%2Fjs-sdk-objects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-sdk%2Fjs-sdk-objects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-sdk%2Fjs-sdk-objects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/js-sdk","download_url":"https://codeload.github.com/js-sdk/js-sdk-objects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246153576,"owners_count":20732025,"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","library","objects"],"created_at":"2024-10-02T19:07:05.944Z","updated_at":"2025-03-29T07:27:07.106Z","avatar_url":"https://github.com/js-sdk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-sdk-objects\n\nSimple objects utilities.\n\n## library\n\n```ts\n$ update(f : Any -\u003e Any, k : String, o : Object) -\u003e Object\n\n// Update the value of key 'k' if present.\n\n\n$ updateWithKey(f : (k : String, v : Any) -\u003e Any, k : String, o : Object) -\u003e Object\n\n// Update the value of key 'k' if present.\n// Function 'f' will receive the pair (k, v) and must return the new value of 'k'.\n\n$ merge(f : (k : String, vA : Any, vB : Any) -\u003e Any, a : Object, b : Object) -\u003e Object\n\n// Merge 2 objects and use a function if 'k' key is present in both objects.\n// NOTE: to make it recursive, just check if the values that the function \n// receives are Objects and call merge on them.\n```\n\n## license\n\nSee `license.md` or visit [Unlicense](http://unlicense.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-sdk%2Fjs-sdk-objects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-sdk%2Fjs-sdk-objects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-sdk%2Fjs-sdk-objects/lists"}