New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vue-underscore

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-underscore

simple underscore implementation for vueJS

latest
Source
npmnpm
Version
0.1.4
Version published
Maintainers
1
Created
Source

vue-underscore

You 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. I arranged it as a vue plugin to use on your projects.

Version Packagist

Table of Contents

Requirements

  • Vue.js 2.x

Installation

# npm
$ npm install vue-underscore

Usage

After use plugin on main.js. You can call it simply with 'this.$_.findwhere' (each, map, reduce, filter...)

main.js

import Vue from 'vue';
import underscore from 'vue-underscore';
import App from './App';

Vue.use(underscore);

new Vue({
  ...App
}).$mount('#app');

You will be able to access underscore directly via

import {_} from 'vue-underscore';

let testArr = [{id: 1}, {id:2}];
let foundInfo = _.findWhere(testArr, {id:1});

Examples


<script>
export default {
  methods: {
    test () {
      let testArr = [{id: 1}, {id:2}];
  
      let foundInfo = this.$_.findWhere(testArr, {id:1});
    
    }
  }
}
</script>

License

The MIT License

FAQs

Package last updated on 23 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts