Darragh Enright
Darragh Enright

Reputation: 14136

JS - meaning of @ in import '@foo/bar'

While reading this article earlier, I came across the following line of code:

import { run } from '@cycle/core';

Which led me to the following questions:

Is it a way to resolve a particular type of module?

I'm relatively new to ES6, although the import syntax seems pretty straightforward to me - except, in this case, for the cryptic presence of the @ symbol.

I tried googling but couldn't find any information on Stack Overflow, MDN or elsewhere.

Upvotes: 4

Views: 480

Answers (1)

Álvaro González
Álvaro González

Reputation: 146540

Right from the Getting Started docs:

Packages of the type @org/package are npm scoped packages, supported if your npm installation is version 2.11 or higher. Check your npm version with npm --version and upgrade in order to install Cycle.js.

In case you are not dealing with a DOM-interfacing web application, you can omit @cycle/dom when installing.

Upvotes: 4

Related Questions