Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opencreek/ext

Package Overview
Dependencies
Maintainers
3
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencreek/ext - npm Package Compare versions

Comparing version 2.0.0--canary.22.3712435423.0 to 2.0.0--canary.22.3712483523.0

4

build/collections.d.ts

@@ -5,3 +5,7 @@ declare type PairSplit<T> = T extends [infer F, infer L] ? [Chain<F>, Chain<L>] : never;

export declare function objChain<K extends string | number | symbol, T>(value: Record<K, T> | ObjectChain<K, T> | Chain<readonly [K, T]>): ObjectChain<K, T>;
export declare function objChain<_K extends string | number | symbol, _T>(value: undefined | null): undefined;
export declare function objChain<K extends string | number | symbol, T>(value: Record<K, T> | ObjectChain<K, T> | Chain<readonly [K, T]> | undefined | null): ObjectChain<K, T> | undefined;
export declare function chain<T>(value: ReadonlyArray<T> | Chain<T> | Iterable<T>): Chain<T>;
export declare function chain<_T>(value: undefined | null): undefined;
export declare function chain<T>(value: ReadonlyArray<T> | Chain<T> | Iterable<T> | undefined | null): Chain<T> | undefined;
export declare class ObjectChain<K extends string | number | symbol, T> {

@@ -8,0 +12,0 @@ private val;

@@ -16,2 +16,4 @@ "use strict";

function objChain(value) {
if (value == null)
return undefined;
if (value instanceof ObjectChain) {

@@ -27,2 +29,4 @@ return value;

function chain(value) {
if (value == null)
return undefined;
if (value instanceof Chain)

@@ -29,0 +33,0 @@ return value;

2

package.json
{
"name": "@opencreek/ext",
"version": "2.0.0--canary.22.3712435423.0",
"version": "2.0.0--canary.22.3712483523.0",
"description": "",

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

@@ -40,3 +40,23 @@ import {

value: Record<K, T> | ObjectChain<K, T> | Chain<readonly [K, T]>
): ObjectChain<K, T> {
): ObjectChain<K, T>
export function objChain<_K extends string | number | symbol, _T>(
value: undefined | null
): undefined
export function objChain<K extends string | number | symbol, T>(
value:
| Record<K, T>
| ObjectChain<K, T>
| Chain<readonly [K, T]>
| undefined
| null
): ObjectChain<K, T> | undefined
export function objChain<K extends string | number | symbol, T>(
value:
| Record<K, T>
| ObjectChain<K, T>
| Chain<readonly [K, T]>
| undefined
| null
): ObjectChain<K, T> | undefined {
if (value == null) return undefined
if (value instanceof ObjectChain) {

@@ -58,3 +78,11 @@ return value

value: ReadonlyArray<T> | Chain<T> | Iterable<T>
): Chain<T> {
): Chain<T>
export function chain<_T>(value: undefined | null): undefined
export function chain<T>(
value: ReadonlyArray<T> | Chain<T> | Iterable<T> | undefined | null
): Chain<T> | undefined
export function chain<T>(
value: ReadonlyArray<T> | Chain<T> | Iterable<T> | undefined | null
): Chain<T> | undefined {
if (value == null) return undefined
if (value instanceof Chain) return value

@@ -61,0 +89,0 @@ if (Array.isArray(value)) return new Chain(value)

Sorry, the diff of this file is not supported yet

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