Comparing version 0.0.3 to 0.0.4
global.$=require("./parser/tool") | ||
module.exports=require("./parser/openxml/docx/document") | ||
module.exports=require("./parser/openxml/docx/document") | ||
global.Docx4JS=module.exports |
{ | ||
"name": "docx4js", | ||
"description": "javascript docx parser", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": { | ||
@@ -28,4 +28,3 @@ "name": "Raymond Li", | ||
}, | ||
"main":"dist/docx4js.js", | ||
"browser":"browser.js", | ||
"main":"main.js", | ||
"browserify":{ | ||
@@ -35,3 +34,3 @@ "transform":["deamdify"] | ||
"scripts": { | ||
"pretest": "browserify -t deamdify browser.js -d -o dist/docx4js.js", | ||
"pretest": "browserify -t deamdify -r ./main.js:docx4js -o dist/docx4js.js", | ||
"test": "echo 0", | ||
@@ -38,0 +37,0 @@ "posttest": "uglifyjs dist/docx4js.js -o dist/docx4js.min.js" |
@@ -28,7 +28,9 @@ define(['../model','require', './field/hyperlink','./field/date','./field/ref'],function(Super, require){ | ||
type=type.toLowerCase() | ||
var Model=require.defined('./field/'+type) ? require('./field/'+type) : null | ||
if(Model) | ||
return new Model(instruct.trim(), wDoc, mParent) | ||
try{ | ||
return new (require('./field/'+type))(instruct.trim(), wDoc, mParent) | ||
}catch(e){ | ||
} | ||
} | ||
}) | ||
}) |
@@ -121,3 +121,3 @@ | ||
return global.$=$ | ||
return $ | ||
}); |
docx4js | ||
======= | ||
a javascript docx parser | ||
a javascript docx parser | ||
#build | ||
change deamdiy/index.js line 159 as following: | ||
``` js | ||
id: { type: 'Identifier', name: vars[i] || ('__a'+i)}, | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10
3503404
108
21839
14