You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

unsplash-js

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.2 to 2.1.3

examples/webpack/main.js

15

examples/webpack/index.js

@@ -1,13 +0,4 @@

import Unsplash, { toJson } from "unsplash-js";
require('es6-promise').polyfill();
require('whatwg-fetch');
let unsplash = new Unsplash({
applicationId: "{YOUR_APPLICATION_ID}",
secret: "{YOUR_SECRET}",
callbackUrl: "{YOUR_CALLBACK_URL}"
});
unsplash.users.profile("naoufal")
.then(toJson)
.then(json => {
console.log(json);
});
require('./main');

30

examples/webpack/webpack.config.js

@@ -1,15 +0,15 @@

var path = require('path');
var webpack = require('webpack');
var path = require("path");
var webpack = require("webpack");
module.exports = {
devtool: 'eval',
devtool: "eval",
entry: [
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
'./index'
"webpack-dev-server/client?http://localhost:3000",
"webpack/hot/only-dev-server",
"./index"
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
path: path.join(__dirname, "dist"),
filename: "bundle.js",
publicPath: "/static/"
},

@@ -19,11 +19,3 @@ plugins: [

new webpack.NoErrorsPlugin(),
new webpack.DefinePlugin({
'Promise': 'es6-promise',
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch',
'process': {
'browser': true
}
}),
new webpack.IgnorePlugin(/^form-data/),
new webpack.IgnorePlugin(/^node-fetch/),
new webpack.IgnorePlugin(/node-fetch/)
],

@@ -33,3 +25,3 @@ module: {

test: /\.js$/,
loaders: ['babel-loader'],
loaders: ["babel-loader"],
exclude: /node_modules/,

@@ -36,0 +28,0 @@ include: __dirname

{
"name": "unsplash-js",
"version": "2.1.2",
"version": "2.1.3",
"description": "A Universal JavaScript wrapper for the Unsplash API",

@@ -5,0 +5,0 @@ "main": "lib/unsplash.js",

"use strict";
const webpack = require("webpack");
module.exports = {
output: {
library: "Unsplash",
libraryTarget: "umd"
},
module: {

@@ -9,14 +15,8 @@ loaders: [

},
output: {
library: "Unsplash",
libraryTarget: "umd"
},
externals: [{
"whatwg-fetch": {
root: "fetch",
commonjs2: "whatwg-fetch",
commonjs: "whatwg-fetch",
amd: "whatwg-fetch"
}
}]
plugins: [
new webpack.IgnorePlugin(/node-fetch/),
new webpack.DefinePlugin({
"process.browser": true
})
]
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc