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

vivisector

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vivisector - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/vivisector.cjs.js

74

package.json
{
"name": "vivisector",
"version": "1.1.0",
"version": "1.1.1",
"description": "node.js library for creating observable datatypes",
"main": "./lib/index.js",
"main": "dist/vivisector.cjs.js",
"browser": "dist/vivisector.umd.js",
"module": "dist/vivisector.es.js",
"exports": {
"require": "dist/vivisector.cjs.js",
"import": "dist/vivisector.es.js"
},
"engines": {
"node": ">= 10"
},
"type": "module",
"files": [
"lib/",
"CONTRIBUTING.md"
"dist/"
],

@@ -14,3 +23,3 @@ "jest": {

"collectCoverageFrom": [
"src/**/*.js"
"lib/**/*.js"
],

@@ -26,17 +35,29 @@ "coverageThreshold": {

},
"lint-staged": {
"lib/**/*.js": [
"npm run lint",
"npm run test"
]
},
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-push": "npm run lint && npm run test"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"scripts": {
"coverage": "jest --coverage && rimraf ./coverage",
"lint": "eslint ./",
"test": "jest && rimraf ./coverage",
"testmon": "jest --watch _tests_.*",
"prebuild": "rimraf ./lib",
"build": "babel ./src -d ./lib",
"clean": "rimraf ./coverage && rimraf ./lib",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"lint": "eslint \"lib/**/*.js\" --no-fix",
"lint:fix": "eslint \"lib/**/*.js\" --fix",
"test": "NODE_OPTIONS='--experimental-vm-modules' jest && rimraf ./coverage",
"testmon": "NODE_OPTIONS='--experimental-vm-modules' jest --watch _tests_.*",
"prebuild": "rimraf ./dist",
"build": "rollup -c",
"clean": "rimraf ./coverage && rimraf ./dist",
"coveralls": "NODE_OPTIONS='--experimental-vm-modules' jest --coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"prerelease": "npm pack && tar -xvzf *.tgz && rimraf package *.tgz",

@@ -64,17 +85,20 @@ "semantic-release": "semantic-release"

"devDependencies": {
"@babel/cli": "^7.10.4",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@babel/cli": "^7.13.0",
"@babel/preset-env": "^7.13.9",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-node-resolve": "11.2.0",
"babel-eslint": "^10.1.0",
"coveralls": "^3.1.0",
"cz-conventional-changelog": "^3.2.0",
"eslint": "^7.4.0",
"husky": "^4.2.5",
"jest": "^26.1.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.21.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"lint-staged": "10.5.4",
"rimraf": "^3.0.2",
"semantic-release": "^17.1.1"
"rollup": "2.40.0",
"rollup-plugin-terser": "7.0.2",
"semantic-release": "^17.4.1"
},
"dependencies": {},
"config": {

@@ -81,0 +105,0 @@ "commitizen": {

![Vivisector Logo](https://github.com/MatthewZito/vivisector-js/blob/master/documentation/vx.png)
# Vivisector.js | Create observable JavaScript datatypes
# Vivisector.js | Create event-driven datatypes
[![Coverage Status](https://coveralls.io/repos/github/MatthewZito/vivisector-js/badge.svg?branch=master)](https://coveralls.io/github/MatthewZito/vivisector-js?branch=master)

@@ -16,3 +16,3 @@ [![npm version](https://badge.fury.io/js/vivisector.svg)](https://badge.fury.io/js/vivisector)

## <a name="intro"></a> Introduction
*Vivisector.js* is a light-weight Nodejs library that exposes custom event-driven datatypes. *Vivisector's* *Observable* types broadcast unique events correlated to specific types of mutations and accessors. As such, one can bind methods to variables and render them event-bound.
*Vivisector.js* is a light-weight JavaScript library that exposes custom event-driven datatypes. *Vivisector's* *Observable* types broadcast unique events correlated to specific types of mutations and accessors. As such, one can bind methods to variables and render them event-bound.

@@ -23,2 +23,3 @@ *Vivisector* is flexible, compact, and straightforward; it affords you fine-grained control by allowing you to decide when and what happens when a variable changes.

- custom *Observable* datatypes for Array, Object/Array, and String data
- all datatypes are pure functions
- instantly link/unlink actions to a variable's state

@@ -36,3 +37,3 @@ - bind unlimited callbacks to specific types of state-mutation events *e.g. `itemadded`, `itemremoved`*

```
const Vx = require("vivisector");
const Vx = require("vivisector"); // assuming cjs - Vivisector supports esm, too
```

@@ -110,2 +111,3 @@

| **index** | the index at which the item was added |
**Fires on:** *push, unshift, splice*

@@ -120,2 +122,3 @@

| **index** | the index to which the item was allocated |
**Fires on:** *unshift, using index accessors to set Array items*

@@ -132,2 +135,3 @@ <br>

| **index** | the index at which the item was removed |
**Fires on:** *pop, shift, splice*

@@ -142,2 +146,3 @@

| **index** | String "all", denoting all indices will have been affected |
**Fires on:** *Using the value accessor to mutate the Array value*

@@ -228,2 +233,5 @@ <hr>

#### Functional Purity
The `Vx` handler copies by value, not by reference. Observables do not modify the original Objects passed to them upon instantiation.
#### value

@@ -248,3 +256,3 @@ A non-enumerable accessor for getting and/or setting the core value of a given *Observable*

#### identifier
A unique identifier assigned to all *Observables*. Namespace confined to the Nodejs runtime's `global`, or 'module context'. Currently a paused feature.
A unique identifier assigned to all *Observables*. Namespace confined to the Nodejs (or your target runtime) runtime's `global`, or 'module context'. Currently a paused feature.

@@ -251,0 +259,0 @@ #### type

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