
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
HTML save string utilities for JavaScript.
If you're using node, you can run npm install htmlsave
.
htmlsave is also available via Bower (bower install htmlsave
)
Alternatively if you just want to grab the file yourself, you can download either the current stable production version or the development version directly.
htmlsave supports AMD (e.g. RequireJS), CommonJS (e.g. Node.js) and direct usage (e.g. loading globally with a <script> tag) loading methods. You should be able to do nearly anything, and then skip to the next section anyway and have it work. Just in case though, here's some specific examples that definitely do the right thing:
var htmlsave = require('htmlsave');
htmlsave.truncate('<p>lorem ipsum html text</p>', 12, {
breakword: false,
});
define(['htmlsave'], function(htmlsave) {
htmlsave.slice('<span>my extra long html text</span>', 10);
});
<script src="htmlsave.min.js"></script>
<script>
htmlsave.truncate('another too long text', 5);
</script>
htmlsave.truncate(input, maxlength,<options>)
method.htmlsave.slice(input, maxlength,<options>)
method.Required
Type: string
Required
Type: int
Max characters allowed. Use 0
for slice
to split by word.
Type: boolean
Default value: true
Allow script to truncate words. Disable to only allow truncating on whitespace, block-level elements and void elements.
Type: String
Default value: ....
End truncated string with ellipsis. This option has no effect on slice
.
Copyright (c) 2016 Ben Zörb Licensed under the MIT license.
FAQs
HTML save string utilities
The npm package htmlsave receives a total of 1,994 weekly downloads. As such, htmlsave popularity was classified as popular.
We found that htmlsave demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.