1 | [npm]: https://img.shields.io/npm/v/@jsep-plugin/assignment
|
2 | [npm-url]: https://www.npmjs.com/package/@jsep-plugin/assignment
|
3 | [size]: https://packagephobia.now.sh/badge?p=@jsep-plugin/assignment
|
4 | [size-url]: https://packagephobia.now.sh/result?p=@jsep-plugin/assignment
|
5 |
|
6 | [![npm][npm]][npm-url]
|
7 | [![size][size]][size-url]
|
8 |
|
9 | # @jsep-plugin/assignment
|
10 |
|
11 | A JSEP plugin for adding assignment expression support. Allows expressions of the form:
|
12 |
|
13 | ```javascript
|
14 | jsep('a = 2');
|
15 | jsep('a += 2');
|
16 | jsep('a++');
|
17 | jsep('--aa');
|
18 | ```
|
19 |
|
20 | ## Install
|
21 |
|
22 | ```console
|
23 | npm install @jsep-plugin/assignment
|
24 | # or
|
25 | yarn add @jsep-plugin/assignment
|
26 | ```
|
27 |
|
28 | ## Usage
|
29 | ```javascript
|
30 | import jsep from 'jsep';
|
31 | import jsepAssignment from '@jsep-plugin/assignment';
|
32 | jsep.plugins.register(jsepAssignment);
|
33 | ```
|
34 |
|
35 | ## Meta
|
36 |
|
37 | [LICENSE (MIT)](/LICENSE)
|