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

@ngneat/elf

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngneat/elf - npm Package Compare versions

Comparing version 1.0.0-beta.1 to 1.0.0-beta.2

2

index.d.ts
export { Store, Reducer, StoreValue, StoreDef, ReducerContext, } from './lib/store';
export { propsFactory } from './lib/props-factory';
export { propsArrayFactory } from './lib/props-array-factory';
export { select, head, asap, distinctUntilArrayItemChanged, } from './lib/operators';
export { select, head, asap, filterNil, distinctUntilArrayItemChanged, } from './lib/operators';
export { getStore, getRegistry, registry$, getStoresSnapshot, } from './lib/registry';

@@ -6,0 +6,0 @@ export { withProps } from './lib/props.state';

@@ -6,1 +6,2 @@ import { MonoTypeOperatorFunction, OperatorFunction } from 'rxjs';

export declare const asap: <T>() => MonoTypeOperatorFunction<T>;
export declare function filterNil<T>(): OperatorFunction<T, NonNullable<T>>;
import { BehaviorSubject, Observable } from 'rxjs';
export declare type ReducerContext = {
config: Record<PropertyKey, any>;
};
export declare type StoreValue<T extends Store> = ReturnType<T['getValue']>;
export declare type Reducer<State> = (state: State, context: ReducerContext) => State;
export interface StoreDef<State = any> {
name: string;
state: State;
config: any;
}
export declare class Store<SDef extends StoreDef = any, State = SDef['state']> extends BehaviorSubject<State> {
storeDef: SDef;
private storeDef;
initialState: State;

@@ -30,1 +20,11 @@ private context;

}
export declare type ReducerContext = {
config: Record<PropertyKey, any>;
};
export declare type StoreValue<T extends Store> = ReturnType<T['getValue']>;
export declare type Reducer<State> = (state: State, context: ReducerContext) => State;
export interface StoreDef<State = any> {
name: string;
state: State;
config: any;
}
{
"name": "@ngneat/elf",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "A reactive state management for JS applications",

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

import { Subject, BehaviorSubject, Observable, pipe, asapScheduler } from 'rxjs';
import { map, distinctUntilChanged, debounceTime } from 'rxjs/operators';
import { map, distinctUntilChanged, debounceTime, filter } from 'rxjs/operators';

@@ -147,2 +147,5 @@ const registry = new Map();

const asap = () => debounceTime(0, asapScheduler);
function filterNil() {
return filter(value => value !== null && value !== undefined);
}

@@ -322,2 +325,2 @@ function coerceArray(value) {

export { Store, asap, capitalize, coerceArray, createState, distinctUntilArrayItemChanged, getRegistry, getStore, getStoresSnapshot, head, isFunction, isObject, isString, isUndefined, propsArrayFactory, propsFactory, registry$, select, withProps };
export { Store, asap, capitalize, coerceArray, createState, distinctUntilArrayItemChanged, filterNil, getRegistry, getStore, getStoresSnapshot, head, isFunction, isObject, isString, isUndefined, propsArrayFactory, propsFactory, registry$, select, withProps };
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :
typeof define === 'function' && define.amd ? define(['exports', 'rxjs', 'rxjs/operators'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Store = {}, global.rxjs, global.operators));
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Store = {}, global.Rx, global.Rx));
}(this, (function (exports, rxjs, operators) { 'use strict';

@@ -244,2 +244,7 @@

};
function filterNil() {
return operators.filter(function (value) {
return value !== null && value !== undefined;
});
}

@@ -422,2 +427,3 @@ function coerceArray(value) {

exports.distinctUntilArrayItemChanged = distinctUntilArrayItemChanged;
exports.filterNil = filterNil;
exports.getRegistry = getRegistry;

@@ -424,0 +430,0 @@ exports.getStore = getStore;

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