Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
html-code-gen
Advanced tools
Readme
html-code-gen is a HTML-code generator. It generates HTML code with given dom(-like) object.
nodejs
npm install html-code-gen
var htmlCodeGen = require('html-code-gen');
browser (UMD bundle generated by browserify)
global
<script src="html-code-gen/browser/html-code-gen.min.js"></script>
var htmlCodeGen = window.htmlCodeGen;
AMD
var htmlCodeGen = require('html-code-gen');
htmlCodeGen.print(dom, opt);
htmlCodeGen.printAsync(dom, opt).then(
output => console.log(output)
);
indent-size
: size of indent
default: 4
indent-char
: char of indent ( space / tab )
default: 'space'
max-char
: max char num in one line (TODO)
default: 80
no-format-tag
: tags whose content should not be formatted
default: spec.tagTypeMap.structural
no-format
: no format
default: false
inline-tag
: tags whose content should be inline
default: spec.tagTypeMap.inline
formatter
: special formatters { tagName ( script / style ) : formater )
default: {}
bool-attribute-value
: hide value of boolean attribute or not ( 'remove' / 'preserve' )
default: 'remove'
self-close
: should void tags close themeselves with "/" ( 'close' / 'no-close' )
default: 'no-close'
level
: current level
default: 0
run test cases
npm run test
build for browser
npm run browser
FAQs
html-code-gen ========
The npm package html-code-gen receives a total of 196 weekly downloads. As such, html-code-gen popularity was classified as not popular.
We found that html-code-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.