Socket
Socket
Sign inDemoInstall

101

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

101 - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

5

find-index.js

@@ -6,2 +6,3 @@ /**

var isFunction = require('./is-function');
var exists = require('./exists');
var isArray = Array.isArray;

@@ -18,3 +19,3 @@

module.exports = function (list, predicate) {
if (list && 'length' in list && !isFunction(list)) {
if (exists(list && list.length) && !isFunction(list)) {
return findIndex(list, predicate);

@@ -34,3 +35,3 @@ }

function findIndex (list, predicate) {
if (!list || !('length' in list)) {
if (!exists(list && list.length)) {
throw new TypeError('list must be have length property');

@@ -37,0 +38,0 @@ }

2

last.js

@@ -19,3 +19,3 @@ /**

var val;
if (exists(item && ('length' in item)) && !isFunction(item)) {
if (exists(item && item.length) && !isFunction(item)) {
val = item[item.length - 1];

@@ -22,0 +22,0 @@ }

{
"name": "101",
"version": "0.3.1",
"version": "0.3.2",
"description": "common javascript utils that can be required selectively that assume es5+",

@@ -5,0 +5,0 @@ "main": "index.js",

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