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

stencila-js

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stencila-js - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

5

package.json
{
"name": "stencila-js",
"version": "0.3.0",
"version": "0.3.1",
"description": "Stencila components for Javascript",

@@ -48,4 +48,5 @@ "main": "index.js",

"tape": "^4.6.3",
"testling": "^1.7.1"
"testling": "^1.7.1",
"xmlhttprequest": "^1.8.0"
}
}

4

src/JsSession.js

@@ -88,4 +88,4 @@ const buble = require('buble')

for (let index = 0; index < lines.length; index++) {
if ((index === lines.length - 1) && (lines[index].trim().length > 0)) body += 'return ' + lines[index] + ';\n'
else body += lines[index] + ';\n'
if ((index === lines.length - 1) && (lines[index].trim().length > 0)) body += 'return ' + lines[index] + '\n'
else body += lines[index] + '\n'
}

@@ -92,0 +92,0 @@ body += '}}\n'

@@ -0,1 +1,6 @@

// So we can run tests in Node.js, when not in the browser, use a XMLHttpRequest emulator
if (typeof window === 'undefined') {
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest
}
let cache = {}

@@ -2,0 +7,0 @@

@@ -22,2 +22,5 @@ const {pack} = require('../src/packing')

t.deepEqual(s.execute('let x = 3\n\n'), {errors: {}, output: null}, 'assign')
t.deepEqual(s.execute('// Multiple lines and comments\nlet x = {\na:1\n\n}\n\n'), {errors: {}, output: null}, 'assign')
t.end()

@@ -24,0 +27,0 @@ })

@@ -5,12 +5,14 @@ const need = require('../src/need')

if (typeof window !== 'undefined') {
test('need', t => {
let isNumber = need('is-number')
test('need() can fetch a NPM module', t => {
let isNumber = need('is-number')
t.equal(isNumber(1), true)
t.equal(isNumber('foo'), false)
t.equal(isNumber(1), true)
t.equal(isNumber('foo'), false)
t.end()
})
}
let isNumberCached = need('is-number')
t.deepEqual(isNumber, isNumberCached)
t.throws(() => need('a-non-existent-npm-module'))
t.end()
})
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