{"id":24919752,"url":"https://github.com/steinfletcher/lodash-mix","last_synced_at":"2025-03-28T10:12:50.663Z","repository":{"id":19988911,"uuid":"23256138","full_name":"steinfletcher/lodash-mix","owner":"steinfletcher","description":"Lodash mixins for node and the browser","archived":false,"fork":false,"pushed_at":"2016-04-12T22:23:26.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T08:05:53.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinfletcher.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":"2014-08-23T13:16:47.000Z","updated_at":"2016-07-20T08:57:33.000Z","dependencies_parsed_at":"2022-07-22T03:31:59.970Z","dependency_job_id":null,"html_url":"https://github.com/steinfletcher/lodash-mix","commit_stats":null,"previous_names":["tapatron/lodash-mix"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Flodash-mix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Flodash-mix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Flodash-mix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Flodash-mix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinfletcher","download_url":"https://codeload.github.com/steinfletcher/lodash-mix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246009071,"owners_count":20708881,"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":"2025-02-02T10:37:23.694Z","updated_at":"2025-03-28T10:12:50.639Z","avatar_url":"https://github.com/steinfletcher.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lodash-mix\n\n[![Build Status](https://travis-ci.org/tapatron/lodash-mix.svg?branch=master)](https://travis-ci.org/tapatron/lodash-mix)\n[![npm version](https://badge.fury.io/js/lodash-mix.svg)](http://badge.fury.io/js/lodash-mix)\n\nThis isn't really maintained, but feel free to use it as a basis for your own mixins.\n\n[lodash mixins](http://lodash.com/docs#mixin) I've collected - for node and the browser.\n\nTo use in the browser, include lodash before including this library. \n\n# mixins\n\n### _.format\n\n```javascript\n_.format('Other {} are {}', 'people', 'good plumbers')\n// produces 'Other people are good plumbers'\n\n_.format('/categ/{cat}/{isbn}', {cat: 'books', isbn: '034038204X'})\n// produces '/categ/books/034038204X'\n\n_.format('/categ/{cat}/{isbn}', 'books', '034038204X')\n// produces '/categ/books/034038204X'\n```\n\n### _.uuid\n\n```javascript\n_.uuid()\n// generates an RFC 4122 compliant version 4 uuid\n```\n\n### _.isUuid\n\n```javascript\n_.isUuid('262182b1-f92c-42bd-ab39-8faedb47b4dc')\n// produces true|false. Validates an RFC 4122 compliant version 4 uuid\n```\n\n### _.immutableMerge\n\n```javascript\n_.immutableMerge({a: 1}, {b: 2})\n// produces {a:1 , b:2} without mutating the input objects\n```\n\n### _.upsert\n\n```javascript\nvar base = [{id: 1, data: 2}, {id: 2, data: 3}, {id: 3, data: {nested: 4}}];\nvar matcher = {id: 3, data: {nested: 4}}\nvar newElement = {id: 3, data: 5}\n_.upsert(base, matcher, newElement);\n// produces [{id: 1, data: 2}, {id: 2, data: 3}, {id: 3, data: 5}]\n```\n\n### _.compactObject\n\n```javascript\n_.compactObject({a: false, b: 4, c: {d: null}})\n// produces {b: 4, c: {d: null}} removing properties with falsy values\n\n_.compactObject({a: false, b: 4, c: {d: null}}, true)\n// produces {b: 4, c: {}} removing nested properties with falsy values\n\n```\n### _.ordinal\n\n```javascript\n_.ordinal(142)\n// produces 'nd'\n```\n\n# tests\n\nTests run in node and the browser. Browserify and tape must be installed globally.\n\nExecute from the command line\n\n```bash\nnpm install -g tape\ntape test/**/*.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinfletcher%2Flodash-mix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinfletcher%2Flodash-mix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinfletcher%2Flodash-mix/lists"}