Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@peerboard/core

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peerboard/core - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

16

dist/lib/peerboard-core.js

@@ -50,3 +50,3 @@ "use strict";

};
var defaultOptions = {
var defaultOptions = function () { return ({
resize: true,

@@ -58,5 +58,9 @@ hideMenu: true,

onPathChanged: function (newPath) { return window.history.replaceState({}, window.document.title, newPath); }
};
}); };
exports.createForum = function (forumID, container, options) {
var opts = __assign(__assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true }), options);
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true }), options);
if (!opts.usePathFromQs) {

@@ -114,3 +118,7 @@ // Auto resolve final location using part after the prefix

if (spaceID === void 0) { spaceID = 0; }
var opts = __assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true,
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true,
// tslint:disable-next-line:no-empty

@@ -117,0 +125,0 @@ onPathChanged: function () { } });

@@ -65,3 +65,3 @@ 'use strict';

};
var defaultOptions = {
var defaultOptions = function () { return ({
resize: true,

@@ -73,5 +73,9 @@ hideMenu: true,

onPathChanged: function (newPath) { return window.history.replaceState({}, window.document.title, newPath); }
};
}); };
var createForum = function (forumID, container, options) {
var opts = __assign(__assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true }), options);
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true }), options);
if (!opts.usePathFromQs) {

@@ -129,3 +133,7 @@ // Auto resolve final location using part after the prefix

if (spaceID === void 0) { spaceID = 0; }
var opts = __assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true,
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true,
// tslint:disable-next-line:no-empty

@@ -132,0 +140,0 @@ onPathChanged: function () { } });

@@ -67,3 +67,3 @@ (function (global, factory) {

};
var defaultOptions = {
var defaultOptions = function () { return ({
resize: true,

@@ -75,5 +75,9 @@ hideMenu: true,

onPathChanged: function (newPath) { return window.history.replaceState({}, window.document.title, newPath); }
};
}); };
var createForum = function (forumID, container, options) {
var opts = __assign(__assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true }), options);
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true }), options);
if (!opts.usePathFromQs) {

@@ -131,3 +135,7 @@ // Auto resolve final location using part after the prefix

if (spaceID === void 0) { spaceID = 0; }
var opts = __assign(__assign({}, defaultOptions), { scrollToTopOnNavigationChanged: true,
if (typeof window === 'undefined') {
console.warn('peerboard: window is not defined, cannot create forum, potentially used in ssr');
return Promise.resolve(null);
}
var opts = __assign(__assign({}, defaultOptions()), { scrollToTopOnNavigationChanged: true,
// tslint:disable-next-line:no-empty

@@ -134,0 +142,0 @@ onPathChanged: function () { } });

@@ -91,4 +91,4 @@ export declare enum ExcludeOptions {

export declare const loadSdk: (embedSDKURL?: string | undefined) => Promise<void>;
export declare const createForum: (forumID: number, container: HTMLElement, options: Readonly<Options>) => Promise<ForumAPI>;
export declare const createCommentWidget: (communityID: number, container: HTMLElement, exclude: ExcludeOptions[], spaceID: number | undefined, options: Readonly<WidgetOptions>) => Promise<ForumAPI>;
export declare const createForum: (forumID: number, container: HTMLElement, options: Readonly<Options>) => Promise<ForumAPI | null>;
export declare const createCommentWidget: (communityID: number, container: HTMLElement, exclude: ExcludeOptions[], spaceID: number | undefined, options: Readonly<WidgetOptions>) => Promise<ForumAPI | null>;
export {};
{
"name": "@peerboard/core",
"version": "0.0.22",
"version": "0.0.23",
"description": "peerboard.com frontend components",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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