gacopu
gacopu

Reputation: 646

What is the @ symbol meaning in require?

Recently I've seen many require('@XXX'), like

const PubSub = require(`@google-cloud/pubsub`);

what is this @ meaning? where can I find the syntax?

Upvotes: 1

Views: 651

Answers (2)

Omar
Omar

Reputation: 343

NPM allows users to organize packages into organization scopes.

The @google-cloud part is the scope and pubsub is the package name.

Organizing Packages docs explain it much better.

Upvotes: 4

xExplorer
xExplorer

Reputation: 19

it is used for maintaining package belong to a specific organization, which help them to Organizing People and Package Access and provide team permission (read/write) to package

Upvotes: 0

Related Questions