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

inline-loops.macro

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-loops.macro - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

11

dist/handlers.js

@@ -64,2 +64,11 @@ "use strict";

if (!callbackContainsThis) {
if (isForEach) {
body.traverse(traverseConfigs.stripReturn, {
isForEach: isForEach
});
return {
injectedBody: body.node.body,
returned: t.identifier('undefined')
};
}
if (returnCount < 2) {

@@ -130,3 +139,3 @@ body.traverse(traverseConfigs.stripReturn, {

var localCollection = collection.node;
if (!collection.isIdentifier()) {
if (!collection.isIdentifier() && !collection.isMemberExpression()) {
localCollection = (0, _utils.getLocalName)(path, 'collection');

@@ -133,0 +142,0 @@ var localVariable = templates.localVariable({

24

index.d.ts

@@ -66,20 +66,14 @@ type ArrayHandler<Item, Result> = (

declare function findIndex<Item, Collection extends Item[]>(
collection: Collection,
declare function findIndex<Item>(
collection: Item[],
handler: ArrayHandler<Item, unknown>,
): keyof Collection | -1;
declare function findKey<
Item,
Collection extends Record<number | string, Item>,
>(
collection: Collection,
): number;
declare function findKey<Item>(
collection: Record<number | string, Item>,
handler: ObjectHandler<Item, unknown>,
): keyof Collection | void;
declare function findLastIndex<
Item,
Collection extends Record<number | string, Item>,
>(
collection: Collection,
): string | void;
declare function findLastIndex<Item>(
collection: Item[],
handler: ArrayHandler<Item, unknown>,
): keyof Collection | -1;
): number;

@@ -86,0 +80,0 @@ declare function forEach<Item>(

@@ -61,3 +61,3 @@ {

"typings": "./index.d.ts",
"version": "2.0.1"
"version": "2.0.2"
}
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