{"id":21524873,"url":"https://github.com/degjs/objectutils","last_synced_at":"2025-03-17T18:17:48.273Z","repository":{"id":46948160,"uuid":"41176346","full_name":"DEGJS/objectUtils","owner":"DEGJS","description":"A utility library for working with JavaScript objects.","archived":false,"fork":false,"pushed_at":"2022-12-07T17:40:42.000Z","size":1088,"stargazers_count":0,"open_issues_count":12,"forks_count":1,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-07T05:33:05.543Z","etag":null,"topics":["utility"],"latest_commit_sha":null,"homepage":"","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/DEGJS.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}},"created_at":"2015-08-21T20:34:58.000Z","updated_at":"2021-01-26T16:08:31.000Z","dependencies_parsed_at":"2023-01-24T19:33:41.361Z","dependency_job_id":null,"html_url":"https://github.com/DEGJS/objectUtils","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2FobjectUtils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2FobjectUtils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2FobjectUtils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEGJS%2FobjectUtils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEGJS","download_url":"https://codeload.github.com/DEGJS/objectUtils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244085010,"owners_count":20395523,"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":["utility"],"created_at":"2024-11-24T01:30:10.116Z","updated_at":"2025-03-17T18:17:48.254Z","avatar_url":"https://github.com/DEGJS.png","language":"JavaScript","readme":"# objectUtils\nA utility library for working with JavaScript objects.\n\n## Install\n![Run Tests](https://github.com/DEGJS/objectUtils/workflows/Run%20Tests/badge.svg)\n\nobjectUtils is an ES6 module. Consequently, you'll need an ES6 transpiler ([Babel](https://babeljs.io) is a nice one) as part of your Javascript workflow.\n\nIf you're already using NPM for your project, you can install objectUtils with the following command:\n\n```\n$ npm install @degjs/object-utils\n```\n\n## Usage\n\n### Importing individual objectUtils methods:\n```js\nimport { ensureArray } from \"@degjs/object-utils\";\n\nlet guaranteedArray = ensureArray(possibleArray);\n```\n\n### Importing all objectUtils methods:\n```js\nimport * as objectUtils from \"@degjs/object-utils\";\n\nlet guaranteedArray = objectUtils.ensureArray(possibleArray);\n```\n\n## Methods\n\n### ensureArray(obj)\nThe ensureArray method returns a guaranteed array, regardless of the paramater passed into it.\n\n#### obj\nType: `Array` or `String`  \nThe potential array to test.\n\n### assignDeep(target, source)\nThe assignDeep method copies the values of a source object to a target object. Unlike [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign), assignDeep does a proper deep clone of nested objects.\n\n#### target\nType: `Object`  \nThe source object to copy.\n\n#### source\nType: `Object`  \nThe target object to copy to.\n\n\n## Browser Support\n\nobjectUtils depends on the following browser APIs:\n+ isArray: [Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) | [Polyfill](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill)\n\nTo support legacy browsers, you'll need to include polyfills for the above APIs.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegjs%2Fobjectutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdegjs%2Fobjectutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegjs%2Fobjectutils/lists"}