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

dxf-parser

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dxf-parser - npm Package Compare versions

Comparing version 0.4.4 to 0.4.6

95

.vscode/launch.json
{
"version": "0.1.0",
// List of configurations. Add new configurations or edit existing ones.
// ONLY "node" and "mono" are supported, change "type" to switch.
"configurations": [
{
// Name of configuration; appears in the launch configuration drop down menu.
"name": "Launch dxfparser.test",
// Type of configuration. Possible values: "node", "mono".
"type": "node",
// Workspace relative or absolute path to the program.
"program": "test/DXFParser.test.js",
// Automatically stop program after launch.
"stopOnEntry": false,
// Command line arguments passed to the program.
"args": [],
// Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
"cwd": ".",
// Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
"runtimeExecutable": null,
// Optional arguments passed to the runtime executable.
"runtimeArgs": ["--nolazy"],
// Environment variables passed to the program.
"env": { },
// Use JavaScript source maps (if they exist).
"sourceMaps": false,
// If JavaScript source maps are enabled, the generated code is expected in this directory.
"outDir": null
},
{
"name": "Attach",
"type": "node",
// TCP/IP address. Default is "localhost".
"address": "localhost",
// Port to attach to.
"port": 5858,
"sourceMaps": false
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/index.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
},
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command.PickProcess}",
"port": 5858,
"sourceMaps": false,
"outDir": null
},
{
"name": "Run mocha",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": ["test/**/*.js", "--no-timeouts"],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": { "NODE_ENV": "testing"}
}
]
}

@@ -1014,27 +1014,31 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.DxfParser = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

entity = parseCIRCLE();
log.debug('}')
log.debug('}');
} else if(curr.value === 'TEXT') {
log.debug('TEXT {');
entity = parseTEXT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'DIMENSION') {
log.debug('DIMENSION {');
entity = parseDIMENSION();
log.debug('}')
log.debug('}');
} else if(curr.value === 'SOLID') {
log.debug('SOLID {');
entity = parseSOLID();
log.debug('}')
log.debug('}');
} else if(curr.value === 'POINT') {
log.debug('POINT {');
entity = parsePOINT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'MTEXT') {
log.debug('MTEXT {');
entity = parseMTEXT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'ATTDEF') {
log.debug('ATTDEF {');
entity = parseATTDEF();
log.debug('}')
log.debug('}');
} else if(curr.value === 'INSERT') {
log.debug('INSERT {');
entity = parseINSERT();
log.debug('}');
} else {

@@ -1721,2 +1725,3 @@ log.warn('Unhandled entity ' + curr.value);

entity.extrusionDirection = parsePoint();
curr = scanner.next();
break;

@@ -1732,2 +1737,61 @@ default: // check common entity attributes

var parseINSERT = function() {
var entity;
entity = { type: curr.value };
curr = scanner.next();
while(curr !== 'EOF') {
if(curr.code === 0) break;
switch(curr.code) {
case 2:
entity.name = curr.value;
curr = scanner.next();
break;
case 41:
entity.xScale = curr.value;
curr = scanner.next();
break;
case 42:
entity.yScale = curr.value;
curr = scanner.next();
break;
case 43:
entity.zScale = curr.value;
curr = scanner.next();
break;
case 10:
entity.position = parsePoint();
break;
case 50:
entity.rotation = curr.value;
curr = scanner.next();
break;
case 70:
entity.columnCount = curr.value;
curr = scanner.next();
break;
case 71:
entity.rowCount = curr.value;
curr = scanner.next();
break;
case 44:
entity.columnSpacing = curr.value;
curr = scanner.next();
break;
case 45:
entity.rowSpacing = curr.value;
curr = scanner.next();
break;
case 210:
entity.extrusionDirection = parsePoint();
break;
default: // check common entity attributes
checkCommonEntityProperties(entity);
break;
}
}
return entity;
};
var parsePOINT = function() {

@@ -1734,0 +1798,0 @@ var entity;

@@ -626,27 +626,31 @@ var DxfArrayScanner = require('./DxfArrayScanner.js'),

entity = parseCIRCLE();
log.debug('}')
log.debug('}');
} else if(curr.value === 'TEXT') {
log.debug('TEXT {');
entity = parseTEXT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'DIMENSION') {
log.debug('DIMENSION {');
entity = parseDIMENSION();
log.debug('}')
log.debug('}');
} else if(curr.value === 'SOLID') {
log.debug('SOLID {');
entity = parseSOLID();
log.debug('}')
log.debug('}');
} else if(curr.value === 'POINT') {
log.debug('POINT {');
entity = parsePOINT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'MTEXT') {
log.debug('MTEXT {');
entity = parseMTEXT();
log.debug('}')
log.debug('}');
} else if(curr.value === 'ATTDEF') {
log.debug('ATTDEF {');
entity = parseATTDEF();
log.debug('}')
log.debug('}');
} else if(curr.value === 'INSERT') {
log.debug('INSERT {');
entity = parseINSERT();
log.debug('}');
} else {

@@ -1333,2 +1337,3 @@ log.warn('Unhandled entity ' + curr.value);

entity.extrusionDirection = parsePoint();
curr = scanner.next();
break;

@@ -1344,2 +1349,61 @@ default: // check common entity attributes

var parseINSERT = function() {
var entity;
entity = { type: curr.value };
curr = scanner.next();
while(curr !== 'EOF') {
if(curr.code === 0) break;
switch(curr.code) {
case 2:
entity.name = curr.value;
curr = scanner.next();
break;
case 41:
entity.xScale = curr.value;
curr = scanner.next();
break;
case 42:
entity.yScale = curr.value;
curr = scanner.next();
break;
case 43:
entity.zScale = curr.value;
curr = scanner.next();
break;
case 10:
entity.position = parsePoint();
break;
case 50:
entity.rotation = curr.value;
curr = scanner.next();
break;
case 70:
entity.columnCount = curr.value;
curr = scanner.next();
break;
case 71:
entity.rowCount = curr.value;
curr = scanner.next();
break;
case 44:
entity.columnSpacing = curr.value;
curr = scanner.next();
break;
case 45:
entity.rowSpacing = curr.value;
curr = scanner.next();
break;
case 210:
entity.extrusionDirection = parsePoint();
break;
default: // check common entity attributes
checkCommonEntityProperties(entity);
break;
}
}
return entity;
};
var parsePOINT = function() {

@@ -1346,0 +1410,0 @@ var entity;

{
"name": "dxf-parser",
"version": "0.4.4",
"version": "0.4.6",
"description": "Parse dxf files into a readable, logical js object.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -47,3 +47,3 @@

* LType table
* Block table
* Block table and inserts
* VPort table

@@ -53,3 +53,2 @@ * Text and some MTEXT

Does not yet support
* Block Inserts
* 3DSolids

@@ -56,0 +55,0 @@ * All types of Leaders

@@ -52,6 +52,2 @@ // Type definitions for mocha 2.2.5

declare function before(description: string, action: () => void): void;
declare function before(description: string, action: (done: MochaDone) => void): void;
declare function setup(action: () => void): void;

@@ -65,6 +61,2 @@

declare function after(description: string, action: () => void): void;
declare function after(description: string, action: (done: MochaDone) => void): void;
declare function teardown(action: () => void): void;

@@ -78,6 +70,2 @@

declare function beforeEach(description: string, action: () => void): void;
declare function beforeEach(description: string, action: (done: MochaDone) => void): void;
declare function suiteSetup(action: () => void): void;

@@ -91,6 +79,2 @@

declare function afterEach(description: string, action: () => void): void;
declare function afterEach(description: string, action: (done: MochaDone) => void): void;
declare function suiteTeardown(action: () => void): void;

@@ -123,8 +107,2 @@

checkLeaks(): Mocha;
/**
* Function to allow assertion libraries to throw errors directly into mocha.
* This is useful when running tests in a browser because window.onerror will
* only receive the 'message' attribute of the Error.
*/
throwError(error: Error): void;
/** Enables growl support. */

@@ -131,0 +109,0 @@ growl(): Mocha;

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

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