structed
Structured editing for JavaScript
Last updated a year ago by roman01la .
MIT · Original npm · Tarball · package.json
$ cnpm install structed 
SYNC missed versions from official npm registry.

Structured editing for JavaScript

  • Core library src/index.js
  • Example index.html

Features

  • Hierarchical navigation (expand/shrink selection or cursor position)
  • Manipulate nodes instead of plain text (copy/cut)

Editor plugins

Editor integration guide

Structed's core library is a set of functions that walk AST and return location data for selection or cursor position to be set. It can work with any JS-based editor. See how it is used in VS Code extension.

How it works

Because JavaScript’s source code is represented as plain text we need to parse it into AST first (structured representation of the code). And then analyze AST, with respect to cursor position in the editor, and compute selection range for AST nodes that should be “in focus” by walking the structure and extracting location data.

Current Tags

  • 0.0.2                                ...           latest (a year ago)

1 Versions

  • 0.0.2                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |