Lines Matching refs:team
9 team` command and its various subcommands.
14 const team = require('libnpmteam')
17 console.log(await team.lsTeams('npm'))
41 * [team opts](#opts)
70 #### <a name="create"></a> `> team.create(team, [opts]) -> Promise`
72 Creates a team named `team`. Team names use the format `@<scope>:<name>`, with
80 await team.create('@npm:cli', {token: 'myregistrytoken'})
81 // The @npm:cli team now exists.
84 #### <a name="destroy"></a> `> team.destroy(team, [opts]) -> Promise`
86 Destroys a team named `team`. Team names use the format `@<scope>:<name>`, with
92 await team.destroy('@npm:cli', {token: 'myregistrytoken'})
93 // The @npm:cli team has been destroyed.
96 #### <a name="add"></a> `> team.add(user, team, [opts]) -> Promise`
98 Adds `user` to `team`.
103 await team.add('zkat', '@npm:cli', {token: 'myregistrytoken'}) argument
104 // @zkat now belongs to the @npm:cli team.
107 #### <a name="rm"></a> `> team.rm(user, team, [opts]) -> Promise`
109 Removes `user` from `team`.
114 await team.rm('zkat', '@npm:cli', {token: 'myregistrytoken'}) argument
115 // @zkat is no longer part of the @npm:cli team.
118 #### <a name="ls-teams"></a> `> team.lsTeams(scope, [opts]) -> Promise`
120 Resolves to an array of team names belonging to `scope`.
125 await team.lsTeams('@npm', {token: 'myregistrytoken'})
135 #### <a name="ls-teams-stream"></a> `> team.lsTeams.stream(scope, [opts]) -> Stream`
139 For a Promise-based version of these results, see [`team.lsTeams()`](#ls-teams).
144 for await (let team of team.lsTeams.stream('@npm', {token: 'myregistrytoken'})) {
145 console.log(team)
155 #### <a name="ls-users"></a> `> team.lsUsers(team, [opts]) -> Promise`
157 Resolves to an array of usernames belonging to `team`.
159 For a streamed version of these results, see [`team.lsUsers.stream()`](#ls-users-stream).
164 await team.lsUsers('@npm:cli', {token: 'myregistrytoken'})
172 #### <a name="ls-users-stream"></a> `> team.lsUsers.stream(team, [opts]) -> Stream`
174 Returns a stream of usernames belonging to `team`.
176 For a Promise-based version of these results, see [`team.lsUsers()`](#ls-users).
181 for await (let user of team.lsUsers.stream('@npm:cli', {token: 'myregistrytoken'})) {