Socket
Socket
Sign inDemoInstall

@pnp/sp

Package Overview
Dependencies
Maintainers
6
Versions
1035
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnp/sp - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5-0

24

docs/webs.md

@@ -10,5 +10,5 @@ # @pnp/sp/webs

```TypeScript
import pnp, { WebAddResult } from "@pnp/sp";
import { sp, WebAddResult } from "@pnp/sp";
pnp.sp.web.webs.add("title", "subweb1").then((w: WebAddResult) => {
sp.web.webs.add("title", "subweb1").then((w: WebAddResult) => {

@@ -28,6 +28,6 @@ // show the response from the server when adding the web

```TypeScript
import pnp, { WebAddResult } from "@pnp/sp";
import { sp, WebAddResult } from "@pnp/sp";
// create a German language wiki site with title, url, description, which inherits permissions
pnp.sp.web.webs.add("wiki", "subweb2", "a wiki web", "WIKI#0", 1031, true).then((w: WebAddResult) => {
sp.web.webs.add("wiki", "subweb2", "a wiki web", "WIKI#0", 1031, true).then((w: WebAddResult) => {

@@ -48,6 +48,6 @@ // show the response from the server when adding the web

```TypeScript
import pnp from "@pnp/sp";
import { sp } from "@pnp/sp";
// basic get of the webs properties
pnp.sp.web.get().then(w => {
sp.web.get().then(w => {

@@ -58,3 +58,3 @@ console.log(w.Title);

// use odata operators to get specific fields
pnp.sp.web.select("Title").get().then(w => {
sp.web.select("Title").get().then(w => {

@@ -64,4 +64,4 @@ console.log(w.Title);

// use with a simple getAs to give the result a type
pnp.sp.web.select("Title").getAs<{ Title: string }>().then(w => {
// use with get to give the result a type
sp.web.select("Title").get<{ Title: string }>().then(w => {

@@ -77,5 +77,5 @@ console.log(w.Title);

```TypeScript
import pnp from "@pnp/sp";
import { sp } from "@pnp/sp";
pnp.sp.web.select("AllProperties").expand("AllProperties").get().then(w => {
sp.web.select("AllProperties").expand("AllProperties").get().then(w => {

@@ -106,3 +106,3 @@ console.log(w.AllProperties);

```TypeScript
pnp.sp.site.openWebById("111ca453-90f5-482e-a381-cee1ff383c9e").then(w => {
sp.site.openWebById("111ca453-90f5-482e-a381-cee1ff383c9e").then(w => {

@@ -109,0 +109,0 @@ //we got all the data from the web as well

{
"name": "@pnp/sp",
"version": "1.0.4",
"version": "1.0.5-0",
"description": "pnp - provides a fluent api for working with SharePoint REST",

@@ -11,5 +11,5 @@ "main": "./dist/sp.es5.umd.js",

"peerDependencies": {
"@pnp/common": "1.0.4",
"@pnp/logging": "1.0.4",
"@pnp/odata": "1.0.4"
"@pnp/common": "1.0.5-0",
"@pnp/logging": "1.0.5-0",
"@pnp/odata": "1.0.5-0"
},

@@ -16,0 +16,0 @@ "author": {

@@ -81,2 +81,10 @@ import { TypedHash } from "@pnp/common";

/**
* Gets this web's parent web and data
*
*/
getParentWeb(): Promise<{
data: any;
web: Web;
}>;
/**
* Returns a collection of objects that contain metadata about subsites of the current site in which the current user is a member.

@@ -83,0 +91,0 @@ *

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc