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

acorn-typescript-import

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-typescript-import

Partial support for TS ESM-CJS like imports

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

acorn-typescript-import

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

It implements support for a subset of TypeScript ESM-CJS like imports

import get = require('lodash/get');

Note, the plugin does not support non-external module references, such as import sth = foo.bar;

Usage

This module provides a plugin that can be used to extend the Acorn Parser class:

const { Parser } = require('acorn');
const acornExportNsFrom = require('acorn-typescript-import');
Parser.extend(acornExportNsFrom).parse('import foo = require("bar")');

Thanks

Readme and tests based on acorn-export-ns-from.

LICENSE

MIT

FAQs

Package last updated on 12 May 2019

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