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

poke43

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poke43 - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

15

package.json
{
"name": "poke43",
"version": "2.1.0",
"version": "2.2.0",
"description": "Touch based browser edit components",

@@ -29,10 +29,9 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@emmetio/extract-abbreviation": "^0.2.0",
"@emmetio/field-parser": "^0.3.1",
"babel-core": "^6.26.3",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"rollup": "^0.65.0",
"rollup-plugin-babel": "^3.0.7",
"rollup": "^0.65.2",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.1.6",

@@ -42,3 +41,3 @@ "rollup-plugin-copy": "^0.2.3",

"rollup-plugin-json": "^3.0.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-sass": "^0.9.2"

@@ -45,0 +44,0 @@ },

# Release Notes
## 2.2.0
* Always show some output when eval'ing JS
## 2.1.0

@@ -4,0 +8,0 @@

@@ -26,5 +26,4 @@ import copy from 'rollup-plugin-copy';

plugins: [
'external-helpers',
'transform-class-properties',
'transform-object-rest-spread'
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-object-rest-spread'
]

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

@@ -537,6 +537,19 @@ import Hammer from 'hammerjs';

evalJS() {
let snip = (str, n) => str.trim().
replace(/\s+/gm, ' ').
substr(0, n) + ((n < str.length) ? '...' : '');
const {toString} = Object.prototype;
const output = (v, comment) => {
comment = `(eval JS) ${comment}`;
if (window.peek42) {
peek42.p(v, comment);
} else {
console.log(`// ${comment}\n${v}`);
}
};
const snip = (str, n) => {
let str1 = str.replace(/\s+/gm, ' ');
return (str1.length > n) ? `${str1.slice(0, n)}...` : str1;
};
let src = this.content;
let excerpt = snip(src, 101);
let eval2 = eval;

@@ -555,10 +568,15 @@ let res;

if (['boolean', 'number', 'string'].includes(typeof res)) {
let excerpt = snip(src, 101);
if (window.peek42) {
peek42.p(res, excerpt);
} else {
console.log(`// ${excerpt}\n${res}`);
}
switch (typeof res) {
case 'boolean':
case 'number':
case 'string':
output(res, excerpt); break;
case 'symbol':
output(String(res), excerpt); break;
case 'object':
case 'function':
output(toString.call(res), excerpt); break;
case 'undefined':
default:
output('\u2713', excerpt); break;
}

@@ -565,0 +583,0 @@

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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