NVM version
nvm --version
List versions of Node installed
nvm ls --no-alias
List current version of Node
nvm current
{ | |
"isFallbackPublicClient": true, | |
"publicClient": { | |
"redirectUris": [ | |
"https://login.microsoftonline.com/common/oauth2/nativeclient" | |
] | |
}, | |
"web": { | |
"implicitGrantSettings": { | |
"enableIdTokenIssuance": false |
import { sp } from "@pnp/sp/presets/all"; | |
import "@pnp/sp/taxonomy"; | |
import { taxonomy, ITerm, ITermData } from "@pnp/sp-taxonomy" | |
(async () => { | |
interface ITermDataNode { | |
Id: string; | |
ParentTermId?: string; | |
Name: string; | |
Path: string; |
import { sp, ClientsidePageFromFile, PromotedState, IListItemFormUpdateValue, IClientsidePage, IFileInfo } from "@pnp/sp/presets/all"; | |
console.clear(); | |
function SafeFilename(fileName: string, convertToLower?: boolean): string { | |
const name = (fileName || "") | |
.replace(/[^ a-zA-Z0-9-_]*/gi, "") | |
.replace(/ /gi, "-") | |
.replace(/-*$/gi, "") | |
.replace(/[-]{2,}/gi, "-"); | |
return convertToLower ? name.toLowerCase() : name; |
import { sp, SearchResults, SearchQueryInit, ISearchResult } from "@pnp/sp/presets/all"; | |
console.clear(); | |
function parseUserFormattedString(ownerString) { | |
const owners = ownerString.split(";") | |
.map( (owner) => { | |
const parts = owner.trim().split("|"); | |
const oidstr = parts.splice(2,3).join("").trim(); | |
const oids = oidstr.split(" "); | |
return { |
json = [ | |
{ | |
key: 1, | |
id: 1, | |
label: "Parent #1", | |
isexpanded: false, | |
children: [ | |
{ | |
key: 11, | |
id: 11, |
import { sp } from "@pnp/sp/presets/all"; | |
(async () => { | |
console.clear(); | |
const doPagedQuery = (folder: string, rowLimit: number, scope: "Files"|"Folders", pageToken?: string) => { | |
const list = sp.web.getList('/sites/EDMS_InformationGovernance/Shared%20Documents'); | |
return list.renderListDataAsStream({ | |
ViewXml: ` | |
<View Scope="RecursiveAll"> |
nvm --version
nvm ls --no-alias
nvm current
[~#%&*{}+\\/:<>?|'".]+
const hasInvalidCharacters = teamName.match(/[~#%&*{}+\\/:<>?|'".]+/gi);
## Recursively Remove .DS_Store | |
# Show | |
find . -name '.DS_Store' -type f | |
# Remove | |
find . -name '.DS_Store' -type f -delete |
console.clear(); | |
/* Logging levels | |
0: Error | |
1: Warning | |
2: Info | |
3: Verbose | |
*/ | |
(function() { | |
/* LOAD ADAL.JS onto the page |