Comparing version
@@ -9,2 +9,3 @@ import S from 's-js'; | ||
if (property === '_state') return target; | ||
if (property === SPROXY || property === SNODE) return; | ||
const value = target[property], | ||
@@ -104,3 +105,3 @@ wrappable = isWrappable(value); | ||
for (let i = 0; i < current.length; i++) | ||
if (part(current[i], i)) updatePath(current[i], path.slice(0), traversed.concat([i])); | ||
if (part(current[i], i)) updatePath(current, [i].concat(path), traversed.concat([i])); | ||
} else if (isArray && partType === 'object') { | ||
@@ -110,3 +111,3 @@ // Ex. update('data', { from: 3, to: 12, by: 2 }, 'label', l => l + ' !!!'); | ||
for (let i = from; i <= to; i += by) | ||
updatePath(current[i], path.slice(0), traversed.concat([i])); | ||
updatePath(current, [i].concat(path), traversed.concat([i])); | ||
} else if (isArray && part === '*') { | ||
@@ -113,0 +114,0 @@ // Ex. update('data', '*', 'label', l => l + ' !!!'); |
@@ -15,2 +15,3 @@ 'use strict'; | ||
if (property === '_state') return target; | ||
if (property === SPROXY || property === SNODE) return; | ||
const value = target[property], | ||
@@ -110,3 +111,3 @@ wrappable = isWrappable(value); | ||
for (let i = 0; i < current.length; i++) | ||
if (part(current[i], i)) updatePath(current[i], path.slice(0), traversed.concat([i])); | ||
if (part(current[i], i)) updatePath(current, [i].concat(path), traversed.concat([i])); | ||
} else if (isArray && partType === 'object') { | ||
@@ -116,3 +117,3 @@ // Ex. update('data', { from: 3, to: 12, by: 2 }, 'label', l => l + ' !!!'); | ||
for (let i = from; i <= to; i += by) | ||
updatePath(current[i], path.slice(0), traversed.concat([i])); | ||
updatePath(current, [i].concat(path), traversed.concat([i])); | ||
} else if (isArray && part === '*') { | ||
@@ -119,0 +120,0 @@ // Ex. update('data', '*', 'label', l => l + ' !!!'); |
{ | ||
"name": "solid-js", | ||
"description": "A declarative JavaScript library for building user interfaces.", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"author": "Ryan Carniato", | ||
@@ -23,9 +23,11 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"babel-plugin-jsx-dom-expressions": "0.4.x" | ||
"babel-plugin-jsx-dom-expressions": "~0.4.4" | ||
}, | ||
"devDependencies": { | ||
"babel-plugin-jsx-dom-expressions": "~0.4.4", | ||
"coveralls": "^3.0.2", | ||
"jest": "~24.1.0", | ||
"rollup": "^1.1.0", | ||
"rollup": "^1.2.1", | ||
"rollup-plugin-node-resolve": "^4.0.0" | ||
} | ||
} |
# Solid.js | ||
[](https://travis-ci.com/ryansolid/solid) | ||
[](https://coveralls.io/github/ryansolid/solid?branch=master) | ||
[](https://www.npmjs.com/package/solid-js) | ||
 | ||
 | ||
 | ||
Solid.js is yet another declarative Javascript library for creating user interfaces. It does not use the Virtual DOM. Instead it opts to compile it's templates down to real DOM nodes and wrap updates in fine grained computations. | ||
@@ -44,3 +51,3 @@ | ||
```jsx | ||
import { createRoot, createState, onCleanup } from 'solid-js' | ||
import { createState, onCleanup } from 'solid-js' | ||
@@ -47,0 +54,0 @@ const CountingComponent = () => { |
231
3.13%38092
-27.84%5
66.67%9
-35.71%572
-12.54%