npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@microsoft/teams-js

v2.31.1

Published

Microsoft Client SDK for building app for Microsoft hosts

Downloads

789,212

Readme

Microsoft Teams JavaScript client library

Welcome to the Teams JavaScript client library! For breaking changes, please refer to our changelog in the current <root>/packages/teams-js directory.

This JavaScript library is part of the Microsoft Teams developer platform. See full library reference documentation.

Getting Started

See instructions in the monorepo root for how to clone and build the repository.

Whenever building or testing the Teams client library, you can run pnpm build or pnpm test from the packages/teams-js directory.

Installation

To install the stable version:

npm

npm install --save @microsoft/teams-js

pnpm

pnpm add @microsoft/teams-js

Production

You can reference these files directly from here or point your package manager at them.

Usage

As a package

Install either using npm or pnpm.

If you are using any dependency loader such as RequireJS or SystemJS or module bundler such as browserify, webpack, you can use import syntax to import specific modules. For e.g.

import { app } from '@microsoft/teams-js';

As a script tag

Reference the library inside of your .html page using:

<!-- Microsoft Teams JavaScript API (via CDN) -->
<script
  src="https://res.cdn.office.net/teams-js/2.31.1/js/MicrosoftTeams.min.js"
  integrity="sha384-ihAqYgEJz9hzEU+HaYodG1aTzjebC/wKXQi1nWKZG7OLAUyOL9ZrzD/SfZu79Jeu"
  crossorigin="anonymous"
></script>

<!-- Microsoft Teams JavaScript API (via npm) -->
<script src="node_modules/@microsoft/[email protected]/dist/MicrosoftTeams.min.js"></script>

<!-- Microsoft Teams JavaScript API (via local) -->
<script src="MicrosoftTeams.min.js"></script>

Dependencies

Teams client library depends on Promise type. If you support older browsers and devices which may not yet provide it natively (e.g. IE 11), you need to provide a global polyfill, such as es6-promise, in your bundled application. If you're using a script tag to reference the Teams client library, you need to make sure the polyfill is included and initialized before the Teams client library is initialized.

Full Documentation and Examples

While each interface, class, function, etc. includes compact developer documentation, full documentation about library usage, including examples, can be found here.

Testing

The Teams Test App is used to validate the Teams client library APIs.

Troubleshooting

If the CDN hash value on the npm page is out of date please refer to [here] (https://github.com/OfficeDev/microsoft-teams-library-js/blob/main/packages/teams-js/README.md) for an up to date version. If you notice this problem, please report that issue to us in [GitHub Issues] (https://github.com/OfficeDev/microsoft-teams-library-js/issues)

Contributing

Please be sure to check out the Contributor's guide for crucial steps.