0.6.6 • Published 4 years ago

spfx-jsom v0.6.6

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

spfx-jsom

Use JSOM in SPFx with async-await. spfx-jsom takes care of loading the required SP libs.

Install

npm i spfx-jsom --save

Import using commonjs

import initSpfxJsom, { ExecuteJsomQuery, JsomContext } from "spfx-jsom";

Sample 1 - Get all web properties

async function getAllWebProperties() {
    try {
      const jsomCtx: JsomContext = await initSpfxJsom([SITE_URL]);
      const webAllProperties = jsomCtx.web.get_allProperties();
      await ExecuteJsomQuery(jsomCtx, [{ clientObject: webAllProperties }]);
      return webAllProperties.get_fieldValues();
    } catch (err) {
      throw err;
    }
  }
0.6.6

4 years ago

0.6.5

4 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago