@webqit/subscript
Advanced tools
Comparing version 2.1.30 to 2.1.32
@@ -0,0 +0,0 @@ # Subscript |
@@ -11,3 +11,3 @@ { | ||
"homepage": "https://webqit.io/tooling/subscript", | ||
"version": "2.1.30", | ||
"version": "2.1.32", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
"dependencies": { | ||
"acorn": "^8.7.1", | ||
"acorn": "^8.8.1", | ||
"astring": "^1.8.3" | ||
@@ -37,0 +37,0 @@ }, |
@@ -1,3 +0,3 @@ | ||
# Reactive Contexts Proposal | ||
> a.k.a: Subscript Functions Proposal | ||
# Subscript Functions Proposal | ||
> a.k.a: Reactive Contexts Proposal | ||
@@ -697,7 +697,7 @@ This project proposes a new function primitive that lets us open a *reactive programming context* within JavaScript. | ||
This Polyfill is a work in progress. But it is usable today. | ||
Subscript is usable today via this polyfill. | ||
<!-- BADGES/ --> | ||
<span class="badge-npmversion"><a href="https://npmjs.org/package/@webqit/subscript" title="View this project on NPM"><img src="https://img.shields.io/npm/v/@webqit/subscript.svg" alt="NPM version" /></a></span> <span class="badge-npmdownloads"><a href="https://npmjs.org/package/@webqit/subscript" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/@webqit/subscript.svg" alt="NPM downloads" /></a></span> | ||
<span class="badge-npmversion"><a href="https://npmjs.org/package/@webqit/subscript" title="View this project on NPM"><img src="https://img.shields.io/npm/v/@webqit/subscript.svg" alt="NPM version" /></a></span> | ||
@@ -792,7 +792,7 @@ <!-- /BADGES --> | ||
Simply include a pair of scripts in your page... | ||
Simply include a pair of scripts in your page... in addition to Subscript itself... | ||
```html | ||
<script crossorigin defer src="https://unpkg.com/@webqit/subscript/dist/console-element.js"></script> | ||
<script crossorigin defer src="https://unpkg.com/@webqit/subscript/dist/player-element.js"></script> | ||
<script src="https://unpkg.com/@webqit/subscript/dist/console-element.js"></script> | ||
<script src="https://unpkg.com/@webqit/subscript/dist/player-element.js"></script> | ||
``` | ||
@@ -813,7 +813,7 @@ | ||
Simply include a pair of scripts in your page... | ||
Simply include a pair of scripts in your page... in addition to Subscript itself... | ||
```html | ||
<script crossorigin defer src="https://unpkg.com/@webqit/subscript/dist/console-element.js"></script> | ||
<script crossorigin defer src="https://unpkg.com/@webqit/subscript/dist/inspector-element.js"></script> | ||
<script src="https://unpkg.com/@webqit/subscript/dist/console-element.js"></script> | ||
<script src="https://unpkg.com/@webqit/subscript/dist/inspector-element.js"></script> | ||
``` | ||
@@ -858,3 +858,1 @@ | ||
MIT. | ||
## Credits |
@@ -0,0 +0,0 @@ |
@@ -221,9 +221,11 @@ | ||
let exec = ( contract, declarator, isForLoopInit ) => { | ||
this.setLocation( contract, declarator ); | ||
if ( node.kind === 'const' || !declarator.init ) { | ||
return Node.varDeclarator( declarator.id, declarator.init ); | ||
} | ||
let initReference, [ init ] = contract.signalReference( def, reference => ( initReference = reference, this.generateNodes( context, [ declarator.init ] ) ) ); | ||
let idReference, [ id ] = contract.effectReference( def, reference => ( idReference = reference, this.generateNodes( context, [ declarator.id ] ) ) ); | ||
initReference.setAssignee( idReference ); | ||
this.setLocation( contract, declarator ); | ||
if ( isForLoopInit | ||
|| node.kind === 'const' | ||
|| !declarator.init | ||
if ( | ||
isForLoopInit | ||
// note that we're not asking initReference.refs.size | ||
@@ -230,0 +232,0 @@ || ( !this.params.devMode && !contract.references.filter( reference => reference instanceof SignalReference ).length ) |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /* PrismJS 1.26.0 |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ |
@@ -8,3 +8,5 @@ | ||
let source = ` | ||
foo.bar[keyThatMightChange].property = value; | ||
const aaa = 2; | ||
let ccc = e; | ||
let ddddd = 2; | ||
`; | ||
@@ -17,7 +19,7 @@ | ||
console.log( gen.source ); | ||
/** | ||
console.log( '' ); | ||
console.log( '>> Dependency Graph' ); | ||
console.log( JSON.stringify( gen.graph, null, 4 ) ); | ||
/** | ||
*/ | ||
@@ -87,3 +87,3 @@ | ||
// #/8 | ||
$x(8, $x => { | ||
$x(6, $x => { | ||
c = d; | ||
@@ -93,3 +93,3 @@ }); | ||
// #/12 | ||
$x(12, $x => { | ||
$x(10, $x => { | ||
e = f; | ||
@@ -122,3 +122,3 @@ }); | ||
add( | ||
`assignments bound to references forms a reactive contract.`, | ||
`assignments bound to references form a reactive contract.`, | ||
` | ||
@@ -389,3 +389,3 @@ e = f; | ||
add( | ||
`Do smae for nested Conditionals.`, | ||
`Do same for nested Conditionals.`, | ||
` | ||
@@ -392,0 +392,0 @@ 2 ? 0 : ( 3 ? 0 : 1 ); |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2849170
7289
855
Updatedacorn@^8.8.1