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

weex-rax-framework

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-rax-framework - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

lib/index.js

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -3,0 +3,0 @@ Object.defineProperty(exports, "__esModule", {

{
"name": "weex-rax-framework",
"version": "0.1.0",
"version": "0.1.1",
"description": "Rax framework for weex.",

@@ -19,4 +19,4 @@ "license": "BSD-3-Clause",

"dependencies": {
"runtime-shared": "^0.1.0",
"rax": "^0.1.0"
"runtime-shared": "^0.1.1",
"rax": "^0.1.1"
},

@@ -23,0 +23,0 @@ "devDependencies": {

'use strict';
function freezePrototype() {
Object.freeze(Object);
Object.freeze(Array);
Object.freeze(Object.prototype);
Object.freeze(Array.prototype);
Object.freeze(String.prototype);
Object.freeze(Number.prototype);
Object.freeze(Boolean.prototype);
Object.freeze(Error.prototype);
Object.freeze(Date.prototype);
Object.freeze(Math.prototype);
Object.freeze(RegExp.prototype);
}
freezePrototype();
import {Runtime, Instance} from 'weex-vdom-tester';

@@ -9,4 +27,2 @@ import {config} from 'weex-js-runtime';

Object.a = 1;
global.callNative = () => {};

@@ -192,2 +208,27 @@ global.WXEnvironment = {

it('run in Object.prototype freeze mode', () => {
const code = `
function Foo(){}
// Throw Error
Foo.prototype.toString = function(){};
// Could use Foo.prototype = {toString(){}}
`;
expect(function() {
instance.$create(code, __weex_options__, __weex_data__);
}).toThrowError(/Cannot assign to read only property/);
});
it('run in Object freeze mode', () => {
const code = `
var foo = new Object();
// Throw Error
foo.toString = function(){};
`;
expect(function() {
instance.$create(code, __weex_options__, __weex_data__);
}).toThrowError(/Cannot assign to read only property/);
});
it('define a module', () => {

@@ -194,0 +235,0 @@ const code = `

Sorry, the diff of this file is too big to display

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