New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

indexed-filter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

indexed-filter - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

7

index.js
'use strict';
var appendType = require('append-type');
/*!

@@ -7,9 +9,10 @@ * indexed-filter | MIT (c) Shinnosuke Watanabe

*/
function indexedFilter(arr, fn, thisObj) {
if (!Array.isArray(arr)) {
throw new TypeError(String(arr) + ' is not an array. Expected an array to be filtered.');
throw new TypeError('Expected an array to be filtered, but got a non-array value ' + appendType(arr) + '.');
}
if (typeof fn !== 'function') {
throw new TypeError(String(fn) + ' is not a function. Expected a filter function that returns Boolean value.');
throw new TypeError('Expected a filter function, but got a non-function value ' + appendType(fn) + '.');
}

@@ -16,0 +19,0 @@

{
"name": "indexed-filter",
"version": "1.0.2",
"version": "1.0.3",
"description": "Array#filter() with also detecting indexes of filtered values",

@@ -31,2 +31,5 @@ "repository": "shinnn/indexed-filter",

],
"dependencies": {
"append-type": "^1.0.1"
},
"devDependencies": {

@@ -33,0 +36,0 @@ "@shinnn/eslint-config": "^5.4.0",

Sorry, the diff of this file is not supported yet

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