Socket
Socket
Sign inDemoInstall

eslint-plugin-you-dont-need-lodash-underscore

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-you-dont-need-lodash-underscore - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

2

package.json
{
"name": "eslint-plugin-you-dont-need-lodash-underscore",
"version": "6.2.0",
"version": "6.2.1",
"description": "Check methods you can use natively without lodash/underscore",

@@ -5,0 +5,0 @@ "repository": {

@@ -83,2 +83,3 @@ # You don't (may not) need Lodash/Underscore [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cht8687/You-Dont-Need-Lodash-Underscore)

1. [_.compact](#_compact)
1. [_.concat](#_concat)

@@ -138,2 +139,22 @@ 1. [_.fill](#_fill)

### _.compact
Creates an array with all falsey values removed.
```js
// Underscore/Lodash
_.compact([0, 1, false, 2, '', 3]);
// Native
[0, 1, false, 2, '', 3].filter( v => !!v)
```
### Browser Support
![Chrome][chrome-image] | ![Firefox][firefox-image] | ![IE][ie-image] | ![Opera][opera-image] | ![Safari][safari-image]
:-: | :-: | :-: | :-: | :-: |
✔ | 1.5 ✔ | 9 ✔ | ✔ | ✔ |
**[⬆ back to top](#quick-links)**
### _.concat

@@ -412,3 +433,2 @@

## Collection*

@@ -517,3 +537,3 @@

var array = [1, 2, 3]
// Underscore/Lodash - also called with _.contains
// Underscore/Lodash - also called _.contains
_.includes(array, 1)

@@ -527,3 +547,3 @@ // output: true

// Native (only works with flat array values, no complex objects)
// Native (does not use same value zero)
var array = [1, 2, 3]

@@ -534,3 +554,3 @@ array.indexOf(1) > -1

### Browser Support for `array.includes`
### Browser Support for `Array.prototype.includes`

@@ -541,3 +561,3 @@ ![Chrome][chrome-image] | ![Firefox][firefox-image] | ![IE][ie-image] | ![Opera][opera-image] | ![Safari][safari-image]

### Browser Support for `array.indexOf`
### Browser Support for `Array.prototype.indexOf`

@@ -944,4 +964,4 @@ ![Chrome][chrome-image] | ![Firefox][firefox-image] | ![IE][ie-image] | ![Opera][opera-image] | ![Safari][safari-image]

```js
// Underscore - also called with _.pairs
// Lodash - also called with _.entries
// Underscore - also called _.pairs
// Lodash - also called _.entries
var result = _.toPairs({one: 1, two: 2, three: 3})

@@ -948,0 +968,0 @@ console.log(result)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc