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

path-loader

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

path-loader - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

index.d.ts

30

index.js

@@ -27,8 +27,2 @@ /*

/**
* Utility that provides a single API for loading the content of a path/URL.
*
* @module PathLoader
*/
var supportedLoaders = {

@@ -58,2 +52,13 @@ file: require('./lib/loaders/file'),

/**
* Options used when loading a path.
*
* @typedef {object} LoadOptions
*
* @property {string} [encoding='utf-8'] - The encoding to use when loading the file *(File loader only)*
* @property {string} [method=get] - The HTTP method to use for the request *(HTTP loader only)*
* @property {PrepareRequestCallback} [prepareRequest] - The callback used to prepare the request *(HTTP loader only)*
* @property {ProcessResponseCallback} [processContent] - The callback used to process the response
*/
/**
* Callback used to provide access to altering a remote request prior to the request being made.

@@ -67,3 +72,3 @@ *

*
* @alias module:PathLoader~PrepareRequestCallback
* @alias PrepareRequestCallback
*/

@@ -83,3 +88,3 @@

*
* @alias module:PathLoader~ProcessResponseCallback
* @alias ProcessResponseCallback
*/

@@ -105,10 +110,3 @@

*
* @param {object} location - The location to the document
* @param {object} [options] - The options
* @param {string} [options.encoding='utf-8'] - The encoding to use when loading the file *(File loader only)*
* @param {string} [options.method=get] - The HTTP method to use for the request *(HTTP loader only)*
* @param {module:PathLoader~PrepareRequestCallback} [options.prepareRequest] - The callback used to prepare the request
* *(HTTP loader only)*
* @param {module:PathLoader~ProcessResponseCallback} [options.processContent] - The callback used to process the
* response
* @param {LoadOptions} location - The location to the document
*

@@ -115,0 +113,0 @@ * @returns {Promise} Always returns a promise even if there is a callback provided

@@ -54,3 +54,4 @@ /* eslint-env node, browser */

// buffer() is only available in Node.js
if (typeof req.buffer === 'function') {
if (Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]' &&
typeof req.buffer === 'function') {
req.buffer(true);

@@ -57,0 +58,0 @@ }

{
"name": "path-loader",
"version": "1.0.4",
"version": "1.0.5",
"description": "Utility that provides a single API for loading the content of a path/URL.",

@@ -18,2 +18,3 @@ "main": "index.js",

"files": [
"index.d.ts",
"index.js",

@@ -36,16 +37,19 @@ "lib/**/*.js",

"devDependencies": {
"basic-auth": "^1.1.0",
"@otris/jsdoc-tsd": "^1.0.0",
"basic-auth": "^2.0.0",
"brfs": "~1.4.3",
"browserify": "~14.3.0",
"browserify": "~14.4.0",
"connect": "^3.6.0",
"del": "^2.2.2",
"del": "^3.0.0",
"gulp": "~3.9.1",
"gulp-concat": "^2.6.1",
"gulp-eslint": "^3.0.1",
"gulp-eslint": "^4.0.0",
"gulp-if": "^2.0.2",
"gulp-istanbul": "~1.1.1",
"gulp-jsdoc-to-markdown": "^1.2.2",
"gulp-jsdoc3": "^2.0.0",
"gulp-load-plugins": "^1.5.0",
"gulp-mocha": "~3.0.1",
"gulp-uglify": "^2.1.2",
"gulp-nsp": "^2.4.2",
"gulp-uglify": "^3.0.0",
"karma": "^1.6.0",

@@ -55,6 +59,6 @@ "karma-mocha": "^1.3.0",

"karma-phantomjs-launcher": "^1.0.4",
"mocha": "^3.2.0",
"phantomjs": "^2.1.7",
"run-sequence": "^1.2.2",
"uglifyify": "~3.0.4",
"mocha": "^4.0.1",
"phantomjs-prebuilt": "^2.1.7",
"run-sequence": "^2.2.0",
"uglifyify": "~4.0.4",
"vinyl-buffer": "^1.0.0",

@@ -65,4 +69,4 @@ "vinyl-source-stream": "~1.1.0"

"native-promise-only": "^0.8.1",
"superagent": "^3.6.3"
"superagent": "^3.8.3"
}
}
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