1

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

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

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

MWiesner
  • 8,868
  • 11
  • 36
  • 70
gacopu
  • 594
  • 3
  • 21
  • Does this answer your question? [What is the meaning of the "at" (@) prefix on npm packages?](https://stackoverflow.com/questions/36667258/what-is-the-meaning-of-the-at-prefix-on-npm-packages) – toraritte Oct 09 '21 at 16:04

2 Answers2

4

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.

Omar
  • 343
  • 1
  • 11
0

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

xExplorer
  • 19
  • 2