New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rax-image

Package Overview
Dependencies
Maintainers
8
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-image - npm Package Compare versions

Comparing version 2.2.1-beta.0 to 2.2.1

1

lib/index.d.ts

@@ -0,3 +1,4 @@

/// <reference types="rax" />
import { ImageProps } from './types';
declare function Image({ source, fallbackSource, onLoad, onError, style, resizeMode, ...otherProps }: ImageProps): JSX.Element;
export default Image;

20

lib/index.js

@@ -54,14 +54,10 @@ "use strict";

nativeProps.onLoad = (0, _rax.useCallback)(function (e) {
if (e.success !== null && e.success !== undefined) {
if (e.success) {
onLoad && onLoad(e);
} else {
onError && onError(e);
}
} else if (e.currentTarget != null) {
if (e.currentTarget.naturalWidth > 1 && e.currentTarget.naturalHeight > 1) {
onLoad && onLoad(e);
} else {
onError && onError(e);
}
if (e && e.success) {
// weex
onLoad && onLoad(e);
} else if (e && e.currentTarget && e.currentTarget.naturalWidth > 1 && e.currentTarget.naturalHeight > 1) {
// web
onLoad && onLoad(e);
} else {
onError && onError(e);
}

@@ -68,0 +64,0 @@ }, [onLoad, onError]);

{
"name": "rax-image",
"version": "2.2.1-beta.0",
"version": "2.2.1",
"description": "Image component for Rax.",

@@ -10,6 +10,5 @@ "license": "BSD-3-Clause",

"clean": "rm -rf ./lib ./package-lock.json ./demo/miniapp/lib ",
"build": "npm run clean && rax-scripts build",
"start": "rax-scripts start",
"prepublishOnly": "npm run build",
"test": "npm run build && rax-scripts test"
"build": "npm run clean && ../../node_modules/.bin/build-scripts build --config ../../build.json",
"start": "../../node_modules/.bin/build-scripts start --config ../../build.json",
"prepublishOnly": "npm run build"
},

@@ -43,3 +42,3 @@ "files": [

"devDependencies": {
"@rax-types/rax": "^1.0.5",
"@types/rax": "^1.0.0",
"@types/ali-app": "^1.0.0",

@@ -54,4 +53,2 @@ "@types/jest": "^24.0.12",

"rax": "^1.0.0",
"rax-plugin-component": "^0.1.9",
"rax-scripts": "^2.0.0",
"rax-test-renderer": "^1.0.0",

@@ -58,0 +55,0 @@ "rax-text": "^1.0.1",

Sorry, the diff of this file is not supported yet

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