Socket
Socket
Sign inDemoInstall

@ngneat/elf

Package Overview
Dependencies
1
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

7

index.esm.js

@@ -305,5 +305,6 @@ import { BehaviorSubject, Subject, Observable, pipe, asapScheduler } from 'rxjs';

function propsFactory(key, {
initialValue,
initialValue: propsFactoryInitialValue,
config
}) {
let initialValue = propsFactoryInitialValue;
const normalizedKey = capitalize(key);

@@ -320,2 +321,6 @@ return {

[`set${normalizedKey}InitialValue`](value) {
initialValue = value;
},
[`set${normalizedKey}`](value) {

@@ -322,0 +327,0 @@ return function (state) {

@@ -308,5 +308,6 @@ (function (global, factory) {

function propsFactory(key, {
initialValue,
initialValue: propsFactoryInitialValue,
config
}) {
let initialValue = propsFactoryInitialValue;
const normalizedKey = capitalize(key);

@@ -323,2 +324,6 @@ return {

[`set${normalizedKey}InitialValue`](value) {
initialValue = value;
},
[`set${normalizedKey}`](value) {

@@ -325,0 +330,0 @@ return function (state) {

4

lib/props-factory.d.ts

@@ -6,5 +6,5 @@ import { OperatorFunction } from 'rxjs';

[Key in K]: T;
}, Config = EmptyConfig>(key: K, { initialValue, config }: {
}, Config = EmptyConfig>(key: K, { initialValue: propsFactoryInitialValue, config, }: {
initialValue: T;
config?: Config;
}): { [P in `with${Capitalize<K>}` | `update${Capitalize<K>}` | `set${Capitalize<K>}` | `reset${Capitalize<K>}` | `select${Capitalize<K>}` | `get${Capitalize<K>}`]: P extends `get${Capitalize<K>}` ? <S extends Props>(state: S) => T : P extends `select${Capitalize<K>}` ? <S_1 extends Props>() => OperatorFunction<S_1, T> : P extends `reset${Capitalize<K>}` ? <S_2 extends Props>() => Reducer<S_2> : P extends `set${Capitalize<K>}` ? <S_3 extends Props>(value: T | ((state: S_3) => T)) => Reducer<S_3> : P extends `update${Capitalize<K>}` ? <S_4 extends Props>(value: Partial<T> | ((state: S_4) => Partial<T>)) => Reducer<S_4> : P extends `with${Capitalize<K>}` ? (initialValue?: T | undefined) => PropsFactory<Props, Config> : any; };
}): { [P in `with${Capitalize<K>}` | `update${Capitalize<K>}` | `set${Capitalize<K>}InitialValue` | `set${Capitalize<K>}` | `reset${Capitalize<K>}` | `select${Capitalize<K>}` | `get${Capitalize<K>}`]: P extends `get${Capitalize<K>}` ? <S extends Props>(state: S) => T : P extends `select${Capitalize<K>}` ? <S_1 extends Props>() => OperatorFunction<S_1, T> : P extends `reset${Capitalize<K>}` ? <S_2 extends Props>() => Reducer<S_2> : P extends `set${Capitalize<K>}InitialValue` ? (value: T) => void : P extends `set${Capitalize<K>}` ? <S_3 extends Props>(value: T | ((state: S_3) => T)) => Reducer<S_3> : P extends `update${Capitalize<K>}` ? <S_4 extends Props>(value: Partial<T> | ((state: S_4) => Partial<T>)) => Reducer<S_4> : P extends `with${Capitalize<K>}` ? (initialValue?: T | undefined) => PropsFactory<Props, Config> : any; };
{
"name": "@ngneat/elf",
"version": "2.0.0",
"version": "2.1.0",
"description": "A reactive state management for JS applications",

@@ -5,0 +5,0 @@ "publishConfig": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc