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

react-native-fit-image

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fit-image - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

3

package.json
{
"name": "react-native-fit-image",
"version": "1.4.1",
"version": "1.4.2",
"description": "Responsive image component to fit perfectly itself.",

@@ -35,2 +35,3 @@ "main": "dist/FitImage.js",

"react-native-mock": "^0.2.2",
"sinon": "^1.17.6",
"tap-diff": "^0.1.1",

@@ -37,0 +38,0 @@ "tape": "^4.5.1"

@@ -47,2 +47,8 @@ # React Native Fit Image [![npm version](https://badge.fury.io/js/react-native-fit-image.svg)](https://badge.fury.io/js/react-native-fit-image)

// could use resizeMode
<FitImage
resizeMode="contain"
source={{ uri: 'http://facebook.github.io/react/img/logo_og.png' }}
/>
// or draws image to specific size like Image component.

@@ -49,0 +55,0 @@ <FitImage

import test from 'tape';
import React from 'react';
import { shallow } from 'enzyme';
import { stub } from 'sinon';

@@ -8,7 +9,6 @@ import FitImage from '../src/FitImage';

test('FitImage', nest => {
const setup = (props = {}) => {
const setup = (passedProps = {}) => {
const source = { uri: 'http://facebook.github.io/react/img/logo_og.png' };
const defaultProps = { source };
props = { ...props, ...defaultProps }
const props = { ...passedProps, ...defaultProps };
const wrapper = shallow(<FitImage {...props} />);

@@ -21,3 +21,3 @@

assert.throws(
() => { setup({ width: 100 }); }, Error,
() => { setup({ style: { width: 100 } }); }, Error,
'when width props exist without height'

@@ -27,3 +27,3 @@ );

assert.throws(
() => { setup({ height: 100 }); }, Error,
() => { setup({ style: { height: 100 } }); }, Error,
'when height props exist without width'

@@ -30,0 +30,0 @@ );

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