Socket
Socket
Sign inDemoInstall

mobservable

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobservable - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/typings/observablemap.d.ts

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 1.0.2
* added `mobservable.map()`, which creates a new map similarly to ES6 maps, yet observable. Until properly documentation, see the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).
# 1.0.1

@@ -2,0 +6,0 @@

import { Lambda, IObservableArray, IObservableValue, IContextInfoStruct } from './interfaces';
import { ObservableValue } from './observablevalue';
import { ObservableView } from './observableview';
import { ObservableMap, KeyValueMap } from './observablemap';
export declare function observable(target: Object, key: string, baseDescriptor?: PropertyDescriptor): any;

@@ -9,2 +10,3 @@ export declare function observable<T>(value: T[]): IObservableArray<T>;

export declare function observable<T extends Object>(value: T): T;
export declare function map<V>(initialValues?: KeyValueMap<V>, valueModifier?: Function): ObservableMap<V>;
export declare function asReference<T>(value: T): T;

@@ -53,3 +55,4 @@ export declare function asStructure<T>(value: T): T;

export declare function getValueModeFromValue(value: any, defaultMode: ValueMode): [ValueMode, any];
export declare function getValueModeFromModifierFunc(func?: Function): ValueMode;
export declare function makeChildObservable(value: any, parentMode: ValueMode, context: any): any;
export declare function assertUnwrapped(value: any, message: any): void;

2

dist/typings/index.d.ts
import { IDependencyTree, IObserverTree, ITransitionEvent, Lambda } from './interfaces';
import SimpleEventEmitter from './simpleeventemitter';
export * from './interfaces';
export { isObservable, observable, extendObservable, asReference, asFlat, asStructure, autorun, autorunUntil, autorunAsync, expr, transaction, toJSON, isObservable as isReactive, observable as makeReactive, extendObservable as extendReactive, autorun as observe, autorunUntil as observeUntil, autorunAsync as observeAsync } from './core';
export { isObservable, observable, extendObservable, asReference, asFlat, asStructure, autorun, autorunUntil, autorunAsync, expr, transaction, toJSON, isObservable as isReactive, map, observable as makeReactive, extendObservable as extendReactive, autorun as observe, autorunUntil as observeUntil, autorunAsync as observeAsync } from './core';
export declare const _: {

@@ -6,0 +6,0 @@ isComputingView: () => boolean;

@@ -12,3 +12,3 @@ import { DataNode } from './dnode';

private makeReferenceValueReactive(value);
set(newValue: T): void;
set(newValue: T): boolean;
get(): T;

@@ -15,0 +15,0 @@ observe(listener: (newValue: T, oldValue: T) => void, fireImmediately?: boolean): Lambda;

@@ -14,3 +14,3 @@ import { ViewNode } from './dnode';

get(): T;
set(): void;
set(x: any): void;
compute(): boolean;

@@ -17,0 +17,0 @@ observe(listener: (newValue: T, oldValue: T) => void, fireImmediately?: boolean): Lambda;

{
"name": "mobservable",
"version": "1.0.1",
"version": "1.0.2",
"description": "Observable data. Reactive functions. Simple code.",

@@ -8,10 +8,10 @@ "main": "dist/mobservable.js",

"scripts": {
"test": "npm run build && npm run buildtest && ./node_modules/istanbul/lib/cli.js cover nodeunit test/*.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js ",
"start": "npm run build && npm run buildtest && ./node_modules/nodeunit/bin/nodeunit test/*.js",
"test": "npm run build && npm run buildtest && istanbul cover nodeunit test/*.js && cat ./coverage/lcov.info | coveralls ",
"start": "npm run build && npm run buildtest && nodeunit test/*.js",
"prepublish": "npm run build",
"build": "rm -rf dist && mkdir -p dist/typings && ./node_modules/typescript/bin/tsc && NODE_ENV=production ./node_modules/webpack/bin/webpack.js && cp -r .build/*.d.ts dist/typings",
"build": "rm -rf dist && mkdir -p dist/typings && tsc && NODE_ENV=production webpack && cp -r .build/*.d.ts dist/typings",
"buildtest": "npm run build-typescript-tests && npm run build-babel-tests",
"build-typescript-tests": "./node_modules/typescript/bin/tsc -m commonjs -t es5 --experimentalDecorators --outDir test test/typescript/typescript-test.ts",
"build-babel-tests": "./node_modules/babel/bin/babel.js --stage 0 test/babel/babel-test.js -o test/babel-test.js",
"perf": "npm run build && ./node_modules/nodeunit/bin/nodeunit test/perf/*.js"
"build-typescript-tests": "tsc -m commonjs -t es5 --experimentalDecorators --outDir test test/typescript/typescript-test.ts",
"build-babel-tests": "babel --stage 0 test/babel/babel-test.js -o test/babel-test.js",
"perf": "npm run build && nodeunit test/perf/*.js"
},

@@ -18,0 +18,0 @@ "repository": {

# mobservable
<img src="https://mweststrate.github.io/mobservable/images/mobservable.png" align="right" width="120px" />

@@ -9,3 +10,4 @@

[![Coverage Status](https://coveralls.io/repos/mweststrate/mobservable/badge.svg?branch=master&service=github)](https://coveralls.io/github/mweststrate/mobservable?branch=master)
[![mobservable channel on slack](https://img.shields.io/badge/slack-mobservable-blue.svg)](https://reactiflux.slack.com/messages/mobservable/)
[![Join the chat at https://gitter.im/mweststrate/mobservable](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mweststrate/mobservable?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![#mobservable channel on reactiflux discord](https://img.shields.io/badge/discord-%23mobservable%20%40reactiflux-blue.svg)](https://discord.gg/0ZcbPKXt5bYAa2J1)

@@ -12,0 +14,0 @@ <br/>

Sorry, the diff of this file is too big to display

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