Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Arnold is tiny JavaScript library for string manipulation. You can use it on server side as well on client side.
To install Arnold, use NPM.
$ npm install arnold
Releases are available for download from GitHub.
Arnold.capitalize('lorem ipsum dolor isamet'); // => Lorem ipsum dolor isamet
## Chars
Arnold.chars('lorem'); // => ['l', 'o', 'r', 'e', 'm']
## Chop
Arnold.chop('lorem ipsum dolor', 4); // => ['lore', 'm ip', 'sum ', 'dolo', 'r']
## Count
Arnold.count('lorem ipsum dolor', 'lor'); // => 2
## CountCharacters
Arnold.countCharacters('lorem'); // => 5
## CountLines
Arnold.countLines('Lorem ipsum.\n Dolor isamet.'); // => 2
## CountWords
Arnold.countWords('lorem ipsum'); // => 2
## Escape
Arnold.escape('<strong>'); // => <strong>
## GetLongestWord
Arnold.getLongestWord(['lorem', 'ipsum', 'dolor', 'isamet']); // => isamet
## GetShortestWord
Arnold.getShortestWord(['lo', 'rem']); // => lo
## Includes
Arnold.includes('lorem ipsum', 'rem'); // => true
## Join
Arnold.join(['Hello', 'World'], ' '); // => Hello World
## Lines
Arnold.lines('Lorem ipsum.\n Dolor isamet.'); // => ['Lorem ipsum.', 'Dolor isamet.']
## LTrim
Arnold.ltrim(' Hello! '); // => "Hello! "
## Reverse
Arnold.reverse('Hello!'); // => !olleH
## RTrim
Arnold.rtrim(' Hello! '); // => " Hello!"
## StripTags
Arnold.stripTags('<strong>Hello!</strong>'); // => Hello!
## Titleize
Arnold.titleize('lorem ipsum dolor'); // => Lorem Ipsum Dolor
## ToBoolean
Arnold.toBoolean(1); // => true
## ToFloat
Arnold.toFloat('12.345 lorem ipsum'); // => 12.345
## ToInt
Arnold.toInt(12.345); // => 12
## ToLowercase
Arnold.toLowercase('HELLO!'); // => hello!
## ToNumber
Arnold.toNumber('123'); // => 123
## ToUppercase
Arnold.toUppercase('hello!'); // => HELLO!
## Trim
Arnold.trim(' Hello! '); // => Hello!
## Truncate
Arnold.truncate('Lorem ipsum dolor isamet pidet quidu delime.', 10); // => Lorem ipsu...
Arnold.truncate('Lorem ipsum dolor isamet pidet quidu delime.', 10, '---'); // => Lorem ipsu---
## Unescape
Arnold.unescape('<strong>'); // => <strong>
## Words
Arnold.words('Lorem ipsum dolor isamet pidet quidu delime.'); // => ['Lorem', 'ipsum', 'dolor', 'isamet', 'pidet', 'quidu', 'delime.']
$ nodeunit tests/
(The MIT License)
Copyright (c) 2011 František Hába <hello@frantisekhaba.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Tiny JavaScript library for string manipulation.
The npm package arnold receives a total of 3 weekly downloads. As such, arnold popularity was classified as not popular.
We found that arnold demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.