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

import-export

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-export

Use ECMA6 import/export syntax from within NodeJS (simply require this module)

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
decreased by-16.05%
Maintainers
1
Weekly downloads
 
Created
Source

##What is this?

This module lets you use ES6 modules (import/export syntax) in nodejs modules.

##How to use

In your main file require the module:

// index.js

require('import-export');

require('./some-other-file1.js');
require('./some-other-file2.js');
...

Then inside your other files you require you can use ES6 module syntax:

// some-other-file1.js

import Duck from './Duck.js';
import { Food, Pond } from 'Duck.js';

and:

// Duck.js

export default class Duck {
  ...
}

export class Pond {
  ...
}

export class Food {
  ...
}

Keywords

FAQs

Package last updated on 06 Jun 2016

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