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

@ribajs/core

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ribajs/core - npm Package Compare versions

Comparing version 0.18.0 to 0.18.2

src/types/*.pug/index.d.ts

11

package.json
{
"name": "@ribajs/core",
"description": "Core module of Riba.js",
"version": "0.18.0",
"version": "0.18.2",
"author": "Pascal Garber <pascal@jumplink.eu>",

@@ -34,3 +34,4 @@ "private": false,

"doc": "harp server docs/_harp ./docs",
"build-doc": "harp compile docs/_harp ./docs"
"build-doc": "harp compile docs/_harp ./docs",
"link": "npm install && npm link"
},

@@ -45,3 +46,3 @@ "devDependencies": {

"@babel/preset-typescript": "^7.1.0",
"@types/jquery": "^3.3.28",
"@types/jquery": "^3.3.29",
"babel-loader": "^8.0.4",

@@ -56,4 +57,4 @@ "babel-plugin-array-includes": "^2.0.3",

"typescript": "^3.2.2",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.28.0",
"uglifyjs-webpack-plugin": "^2.1.0",
"webpack": "^4.28.2",
"webpack-cli": "^3.1.2"

@@ -60,0 +61,0 @@ },

@@ -1,2 +0,2 @@

import Debug from 'debug';
import { Debug } from '../../modules/debug.module';

@@ -3,0 +3,0 @@ const debuggurito = Debug('formatter');

@@ -322,8 +322,24 @@ import { JQuery } from '../modules';

/**
* Set header for each xhr and jquery request
* @param name Header name
* @param value Hander value
*/
public static setRequestHeaderEachRequest(name: string, value: string) {
// TODO Are old values overwritten if JQuery.ajaxSetup called multiple times?
JQuery.ajaxSetup({
beforeSend: (xhr: JQueryXHR) => {
xhr.setRequestHeader(name, value);
},
});
this._requestHeadersEachRequest.push({
name,
value,
});
}
/**
* Start an XMLHttpRequest() and return a Promise
*
* @memberOf Barba.Utils
* @param {string} url
* @param {number} xhrTimeout Time in millisecond after the xhr request goes in timeout
* @return {Promise}
* @param url
* @param xhrTimeout Time in millisecond after the xhr request goes in timeout
*/

@@ -350,3 +366,5 @@ public static xhr(url: string, xhrTimeout = 5000) {

req.timeout = xhrTimeout;
req.setRequestHeader('x-barba', 'yes');
for (const header of this._requestHeadersEachRequest) {
req.setRequestHeader(header.name, header.value);
}
req.send();

@@ -524,2 +542,10 @@

/**
* Header name value pair to send on each request
*/
protected static _requestHeadersEachRequest: {name: string, value: string}[] = [{
name: 'x-barba',
value: 'yes',
}];
}
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