Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
- Express Docs, if you want to get started and already know JavaScript this is the place to be
/*! | |
* Created by Matthew Bramer | |
* Released under the MIT license | |
* Date: 2016-07-11 | |
* Props to: http://blogs.msmvps.com/windsor/2015/02/13/reduce-code-need-for-rest-api-calls-with-sprestrepository/ | |
* Tested using SharePoint Online & 2013 On-Prem. | |
*/ | |
// http://sharepoint.stackexchange.com/questions/74978/can-i-tell-what-version-of-sharepoint-is-being-used-from-javascript |
Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
/** | |
* Converts an image to a dataURL | |
* @param {String} src The src of the image | |
* @param {Function} callback | |
* @param {String} outputFormat [outputFormat='image/png'] | |
* @url https://gist.github.com/HaNdTriX/7704632/ | |
* @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods | |
* @author HaNdTriX | |
* @example | |
* |
/** | |
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns. | |
**/ | |
// Constructor. | |
var Interface = function (name, methods) { | |
if (arguments.length != 2) { | |
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2."); | |
} | |
this.name = name; |
/** | |
* Add dataset support to elements | |
* No globals, no overriding prototype with non-standard methods, | |
* handles CamelCase properly, attempts to use standard | |
* Object.defineProperty() (and Function bind()) methods, | |
* falls back to native implementation when existing | |
* Inspired by http://code.eligrey.com/html5/dataset/ | |
* (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js ) | |
* Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below) | |
* All code below is Licensed under the X11/MIT License |
(function() { | |
var nsName = "LS"; // root namespace name | |
var ns = window[nsName]; // root namespace alias | |
var utils = ns.Utils; // utils alias | |
ns.SP = ns.SP || {}; | |
ns.SP.JSOM = { | |
Data: { | |
Sites: {} // cache for Taxonomy terms JSON | |
}, |
# For more information see: http://www.wictorwilen.se/sharepoint-online-app-only-policy-powershell-tasks-with-acs | |
$clientId = "<INSERT YOUR CLIENT ID HERE>" | |
$secret = "<INSERT YOUR CLIENT SECRET HERE>"; | |
$redirecturi = "<INSERT YOUR REDIRECT URI HERE>" | |
$url = "https://<TENANT>.sharepoint.com/sites/contoso/" | |
$domain = "<TENANT>.sharepoint.com" | |
$identifier = "00000003-0000-0ff1-ce00-000000000000" |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.