Skip to content

Commit

Permalink
combine multiple bindings in single handler, implement bind:indetermi…
Browse files Browse the repository at this point in the history
…nate — fixes #910
  • Loading branch information
Rich-Harris authored Nov 21, 2017
1 parent 509fb1a commit 7758667
Show file tree
Hide file tree
Showing 23 changed files with 737 additions and 733 deletions.
13 changes: 1 addition & 12 deletions src/generators/dom/visitors/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,10 @@ import getTailSnippet from '../../../utils/getTailSnippet';
import getObject from '../../../utils/getObject';
import getExpressionPrecedence from '../../../utils/getExpressionPrecedence';
import { stringify } from '../../../utils/stringify';
import stringifyProps from '../../../utils/stringifyProps';
import { Node } from '../../../interfaces';
import { State } from '../interfaces';

function stringifyProps(props: string[]) {
if (!props.length) return '{}';

const joined = props.join(', ');
if (joined.length > 40) {
// make larger data objects readable
return `{\n\t${props.join(',\n\t')}\n}`;
}

return `{ ${joined} }`;
}

interface Attribute {
name: string;
value: any;
Expand Down
349 changes: 0 additions & 349 deletions src/generators/dom/visitors/Element/Binding.ts

This file was deleted.

Loading

0 comments on commit 7758667

Please sign in to comment.