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

@solid-primitives/range

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/range - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

8

dist/index.d.ts
import { MaybeAccessor } from '@solid-primitives/utils';
import { Accessor } from 'solid-js';
import { Accessor, JSX } from 'solid-js';

@@ -47,3 +47,3 @@ type RangeProps = {

children: ((index: number) => T) | T;
}): Accessor<T[]>;
}): JSX.Element;

@@ -92,3 +92,3 @@ /**

children: ((number: number) => T) | T;
}): Accessor<T[]>;
}): JSX.Element;

@@ -137,4 +137,4 @@ /**

children: ((number: Accessor<number>) => T) | T;
}): Accessor<T[]>;
}): JSX.Element;
export { IndexRange, Range, RangeProps, Repeat, indexRange, mapRange, repeat };

@@ -61,6 +61,9 @@ import { onCleanup, createMemo, untrack, DEV, createRoot, createSignal } from 'solid-js';

function Repeat(props) {
const fallback = props.fallback ? () => props.fallback : void 0;
const mapFn = typeof props.children === "function" ? props.children : () => props.children;
const length = () => props.times;
return repeat(length, mapFn, { fallback });
return createMemo(
repeat(
() => props.times,
toFunction(() => props.children),
"fallback" in props ? { fallback: () => props.fallback } : void 0
)
);
}

@@ -163,5 +166,11 @@ function mapRange(getStart, getTo, getStep, mapFn, options = {}) {

}
const fallback = props.fallback ? () => props.fallback : void 0;
const mapFn = toFunction(() => props.children);
return mapRange(start, to, step, mapFn, { fallback });
return createMemo(
mapRange(
start,
to,
step,
toFunction(() => props.children),
"fallback" in props ? { fallback: () => props.fallback } : void 0
)
);
}

@@ -240,7 +249,13 @@ function indexRange(getStart, getTo, getStep, mapFn, options = {}) {

}
const fallback = props.fallback ? () => props.fallback : void 0;
const mapFn = toFunction(() => props.children);
return indexRange(start, to, step, mapFn, { fallback });
return createMemo(
indexRange(
start,
to,
step,
toFunction(() => props.children),
"fallback" in props ? { fallback: () => props.fallback } : void 0
)
);
}
export { IndexRange, Range, Repeat, indexRange, mapRange, repeat };
{
"name": "@solid-primitives/range",
"version": "0.1.11",
"version": "0.1.12",
"description": "Control Flow Primitives for displaying given number or a number range of elements.",

@@ -57,3 +57,3 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>",

"dependencies": {
"@solid-primitives/utils": "^6.0.0"
"@solid-primitives/utils": "^6.1.0"
},

@@ -60,0 +60,0 @@ "peerDependencies": {

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