0.6.6 • Published 5 years ago

spfx-jsom v0.6.6

Weekly downloads
17
License
MIT
Repository
github
Last release
5 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

5 years ago

0.6.5

5 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

7 years ago

0.5.2

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago