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

canvas-native

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

canvas-native - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

3

dist/lib/converters/json.js

@@ -45,3 +45,4 @@ 'use strict';

currentNode = nodeStack.pop() || json;
nodeStack.pop();
currentNode = nodeStack[nodeStack.length - 1] || json;
}

@@ -48,0 +49,0 @@

@@ -31,3 +31,4 @@ export function convert(native) {

currentNode = nodeStack.pop() || json;
nodeStack.pop();
currentNode = nodeStack[nodeStack.length - 1] || json;
}

@@ -34,0 +35,0 @@

{
"name": "canvas-native",
"description": "Utilities for working with the native Canvas format",
"version": "1.2.2",
"version": "1.2.3",
"author": "Jonathan Clem <jonathan@usecanvas.com>",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/usecanvas/canvas-native/issues",

@@ -99,2 +99,58 @@ import { convert } from '../../../lib/converters/json';

it('does not create consecutive equally-nested lists', () => {
const doc = parse([
`${wrap('unordered-list-0')}- UL-0-0`,
`${wrap('unordered-list-1')}- UL-1-0`,
`${wrap('unordered-list-0')}- UL-0-1`,
`${wrap('unordered-list-1')}- UL-1-0`,
`${wrap('unordered-list-0')}- UL-0-2`,
].join('\n'));
expect(convert(doc).content).to.eql([
{
type : 'unordered-list',
meta : { level: 0 },
content: [
{
type : 'unordered-list-item',
meta : { level: 0 },
content: '- UL-0-0',
},
{
type : 'unordered-list',
meta : { level: 1 },
content: [
{
type : 'unordered-list-item',
meta : { level: 1 },
content: '- UL-1-0'
}
]
},
{
type : 'unordered-list-item',
meta : { level: 0 },
content: '- UL-0-1',
},
{
type : 'unordered-list',
meta : { level: 1 },
content: [
{
type : 'unordered-list-item',
meta : { level: 1 },
content: '- UL-1-0'
}
]
},
{
type : 'unordered-list-item',
meta : { level: 0 },
content: '- UL-0-2',
},
]
}
]);
});
it('handles nested lists', () => {

@@ -101,0 +157,0 @@ const doc = parse([

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