{"id":13563848,"url":"https://github.com/HKskn/vue-underscore","last_synced_at":"2025-04-03T20:32:02.966Z","repository":{"id":65412468,"uuid":"111034309","full_name":"HKskn/vue-underscore","owner":"HKskn","description":"simple vue plugin to implement underscore","archived":false,"fork":false,"pushed_at":"2020-04-16T12:59:07.000Z","size":8,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-28T02:59:56.814Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HKskn.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":"2017-11-16T23:35:00.000Z","updated_at":"2024-09-13T22:49:54.000Z","dependencies_parsed_at":"2023-01-22T08:05:43.249Z","dependency_job_id":null,"html_url":"https://github.com/HKskn/vue-underscore","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/HKskn%2Fvue-underscore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKskn%2Fvue-underscore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKskn%2Fvue-underscore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKskn%2Fvue-underscore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HKskn","download_url":"https://codeload.github.com/HKskn/vue-underscore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223030751,"owners_count":17076494,"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-01T13:01:23.905Z","updated_at":"2024-11-04T16:31:26.099Z","avatar_url":"https://github.com/HKskn.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Utilities [🔝](#readme)","公用事业","Components \u0026 Libraries","Utilities"],"sub_categories":["印花","Utilities","Printing"],"readme":"# vue-underscore\n\nYou know Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter...) without extending any core JavaScript objects.\nI arranged it as a vue plugin to use on your projects.\n\n[![Version](https://img.shields.io/npm/v/vue-underscore.svg)](https://www.npmjs.com/package/vue-underscore)\n[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg?style=plastic)](https://www.npmjs.com/package/vue-underscore)\n\n\n# Table of Contents\n* [___Requirements___](#requirements)\n* [___Installation___](#installation)\n* [___Usage___](#usage)  \n* [___Examples___](#examples)\n* [___License___](#license)\n\n# Requirements\n- [Vue.js](https://github.com/vuejs/vue) `2.x` \n\n\n# Installation\n```bash\n# npm\n$ npm install vue-underscore\n\n```\n# Usage\nAfter using the plugin on main.js. You can call it simply with 'this.$_.findwhere' (each, map, reduce, filter...)\n\nmain.js\n\n```javascript\nimport Vue from 'vue';\nimport underscore from 'vue-underscore';\nimport App from './App';\n\nVue.use(underscore);\n\nnew Vue({\n  ...App\n}).$mount('#app');\n```\nIf you wouldn't like to access from vue prototype, you can add underscore on the component source code directly via below.\n\n```javascript\nimport {_} from 'vue-underscore';\n\nlet testArr = [{id: 1}, {id:2}];\nlet foundInfo = _.findWhere(testArr, {id:1});\n\n```\n\n# Examples\n```html\n\n\u003cscript\u003e\nexport default {\n  methods: {\n    test () {\n      let testArr = [{id: 1}, {id:2}];\n  \n      let foundInfo = this.$_.findWhere(testArr, {id:1});\n    \n    }\n  }\n}\n\u003c/script\u003e\n\n```\n\n\n# License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKskn%2Fvue-underscore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHKskn%2Fvue-underscore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKskn%2Fvue-underscore/lists"}