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

react-lorem-image

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lorem-image - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

12

dist/index.js

@@ -11,2 +11,4 @@ 'use strict';

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -16,3 +18,3 @@

function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

@@ -26,12 +28,10 @@ var _react = require('react');

var LoremImage = (function (_React$Component) {
_inherits(LoremImage, _React$Component);
function LoremImage() {
_classCallCheck(this, LoremImage);
if (_React$Component != null) {
_React$Component.apply(this, arguments);
}
_get(Object.getPrototypeOf(LoremImage.prototype), 'constructor', this).apply(this, arguments);
}
_inherits(LoremImage, _React$Component);
_createClass(LoremImage, [{

@@ -38,0 +38,0 @@ key: 'render',

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

return 'http://www.fillmurray.com/' + (color ? '' : 'g/') + '' + width + '/' + height;
return 'http://www.fillmurray.com/' + (color ? '' : 'g/') + width + '/' + height;
},

@@ -27,3 +27,3 @@ kitten: function kitten(_ref3) {

return 'https://placekitten.com/' + (color ? '' : 'g/') + '' + width + '/' + height;
return 'https://placekitten.com/' + (color ? '' : 'g/') + width + '/' + height;
},

@@ -35,3 +35,3 @@ segal: function segal(_ref4) {

return 'http://www.stevensegallery.com/' + (color ? '' : 'g/') + '' + width + '/' + height;
return 'http://www.stevensegallery.com/' + (color ? '' : 'g/') + width + '/' + height;
},

@@ -45,3 +45,3 @@ cage: function cage(_ref5) {

var type = crazy ? 'c/' : !color ? 'g/' : '';
return 'http://www.placecage.com/' + type + '' + width + '/' + height;
return 'http://www.placecage.com/' + type + width + '/' + height;
},

@@ -59,3 +59,10 @@ vaughn: function vaughn(_ref6) {

return 'http://placebear.com/' + (color ? '' : 'g/') + '' + width + '/' + height;
return 'http://placebear.com/' + (color ? '' : 'g/') + width + '/' + height;
},
beerhold: function beerhold(_ref8) {
var width = _ref8.width;
var height = _ref8.height;
var color = _ref8.color;
return 'http://beerhold.it/' + width + '/' + height + (color ? '' : '/g');
}

@@ -74,16 +81,16 @@ };

function generateURL() {
var _ref8 = arguments[0] === undefined ? {} : arguments[0];
var _ref9 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var _ref8$color = _ref8.color;
var color = _ref8$color === undefined ? true : _ref8$color;
var _ref8$width = _ref8.width;
var width = _ref8$width === undefined ? 200 : _ref8$width;
var _ref8$height = _ref8.height;
var height = _ref8$height === undefined ? width : _ref8$height;
var _ref8$mustache = _ref8.mustache;
var mustache = _ref8$mustache === undefined ? false : _ref8$mustache;
var _ref8$crazy = _ref8.crazy;
var crazy = _ref8$crazy === undefined ? false : _ref8$crazy;
var _ref8$type = _ref8.type;
var type = _ref8$type === undefined ? getRandom(TYPES) : _ref8$type;
var _ref9$color = _ref9.color;
var color = _ref9$color === undefined ? true : _ref9$color;
var _ref9$width = _ref9.width;
var width = _ref9$width === undefined ? 200 : _ref9$width;
var _ref9$height = _ref9.height;
var height = _ref9$height === undefined ? width : _ref9$height;
var _ref9$mustache = _ref9.mustache;
var mustache = _ref9$mustache === undefined ? false : _ref9$mustache;
var _ref9$crazy = _ref9.crazy;
var crazy = _ref9$crazy === undefined ? false : _ref9$crazy;
var _ref9$type = _ref9.type;
var type = _ref9$type === undefined ? getRandom(TYPES) : _ref9$type;

@@ -90,0 +97,0 @@ var url = SERVICES[type]({ color: color, width: width, height: height, crazy: crazy });

@@ -23,2 +23,5 @@ const SERVICES = {

return `http://placebear.com/${ color ? '' : 'g/' }${ width }/${ height }`;
},
beerhold({ width, height, color }) {
return `http://beerhold.it/${ width }/${ height }${ color ? '' : '/g' }`;
}

@@ -25,0 +28,0 @@ };

{
"name": "react-lorem-image",
"version": "1.2.0",
"version": "1.3.0",
"description": "Placeholder images for your react prototypes",

@@ -5,0 +5,0 @@ "main": "dist",

# Lorem Image [![Build Status](https://travis-ci.org/chriskjaer/react-lorem-image.svg)](https://travis-ci.org/chriskjaer/react-lorem-image) [![npm version](https://badge.fury.io/js/react-lorem-image.svg)](http://badge.fury.io/js/react-lorem-image)
<img src="http://mustachify.me/?src=http%3A%2F%2Fplacevaughnandfranco.it%2Fimg%2Fsample.jpg"
align='right' width="240" height="160" hspace="20" alt="Fill Murray"/>
align='right' width="384" height="256" hspace="20" alt="Fill Murray"/>

@@ -16,2 +16,3 @@ Placeholder images for your React prototypes.

- http://placebear.com/
- http://beerhold.it/

@@ -58,2 +59,3 @@ ...all with the option to: http://mustachify.me/ !

- vaughn - Vince Vaughn and Co-stars Pose for Idiotic Stock Photos
- beerholder - a service for thirsty devs from beerhold.it

@@ -60,0 +62,0 @@ # Contributions

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