Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acorn-logical-assignment

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-logical-assignment

Support for logical assignments in acorn

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9K
decreased by-7.64%
Maintainers
3
Weekly downloads
 
Created
Source

Logical assignment support for Acorn

NPM version

This is a plugin for Acorn - a tiny, fast JavaScript parser, written completely in JavaScript.

It implements support for logical assignments as defined in the stage 3 proposal Logical Assignments. The AST follows ESTree.

Usage

This module provides a plugin that can be used to extend the Acorn Parser class to parse logical assignments. You can either choose to use it via CommonJS (for example in Node.js) like this

var acorn = require('acorn');
var logicalAssignment = require('acorn-logical-assignment');
acorn.Parser.extend(logicalAssignment).parse('x ||= y');

or as an ECMAScript module like this:

import {Parser} from 'acorn';
import logicalAssignment from 'path/to/acorn-logical-assignment.mjs';
Parser.extend(logicalAssignment).parse('x ||= y');

License

This plugin is released under an MIT License.

FAQs

Package last updated on 13 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc