DEV Community

Indigo Norrbottenspets
Indigo Norrbottenspets

Posted on

ES6: Imports import

import 'helpers'
//aka: require('···')
Enter fullscreen mode Exit fullscreen mode

import Express from 'express'
//aka: const Express = require('···').default || require('···')
Enter fullscreen mode Exit fullscreen mode

import { indent } from 'helpers'
//aka: const indent = require('···').indent
Enter fullscreen mode Exit fullscreen mode

import *as Helpers from 'helpers'
//aka: const Helpers = require('···')
Enter fullscreen mode Exit fullscreen mode

import { indentSpaces as indent } from 'helpers'
//aka: const indent = require('···').indentSpaces
Enter fullscreen mode Exit fullscreen mode

import is the new require().
See: Module imports

Useful links

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more