
Product
Introducing Socket MCP for Claude Desktop
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
This library was specially created to extend the javascript's string object. Both, server side and client side.
npm install l-string or npm install --save l-string
require("l-string");
console.log("a".ord())
console.log("<h1>\"\'<>&leonardo</h1>".escape())
console.log("<h1>leo</h1>".removeTag())
var a = '<html><head></head><body><h1 class="pepe"></h1><h1 class="juan"></h1><h1 class="andrea"></h1></body></html>'
var b = a.addAttr2Tag("h13", "data-city", "algo")
var c = b.addStyle2Tag("h12", [['margin', '0 0 0 0'], ['color', 'red']])
var d = c.addClassName2Tag("h11", "leonardo")
console.log(d.addIdName2Tag("h12", "pepe").addAttr2Tag("h13", "data-city2", "algo2").addIdName2Tag("h12", "pep22e"))
var a = "<p>leonardo</p>".addAttr2Tag("p", "data-city", "city")
var b = a.addAttr2Tag("p", "data-city2", "")
var c = b.addClassName2Tag("p", "javier")
var d = c.addIdName2Tag("p1", "esparis")
var e = d.addIdName2Tag("p1", "meza")
var d = e.addAttr2Tag("p", "data-city2")
console.log(d.addAttr2Tag("p", "data-city3"))
console.log("leo ".rReplace("eo", "1231"))
console.log("leo ".join("-"))
console.log("leo ".toCharArray())
console.log("leo ".insert("eo", 2))
console.log("leo ".remove("eo"))
console.log("leo ".center(2, "-"))
console.log("leo ".lJust(2, "-"))
console.log("leo ".rJust(2, "-"))
console.log("leo".slugify())
if you dont have browserify installed, and you are using linux,
copy this at the command shell ==> ./node_modules/l-string/bin/make-l-string.web
,
otherwise, copy this ==> sudo npm install -g browserify
then, write this browserify -r l-string:l-string.web > l-string.web.js
then...
<script src="./l-string.web.js"></script> // add this tag to the html file.
Then, in your js file, write code...
(function(){
require("l-string.web");
alert("leo".multiply(10));
})();
:trollface: :trollface: :trollface:
(The MIT License)
Copyright (C) 2015 Leonardo Esparis leo.leo.leoxnidas.c.14@gmail.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.
- new function added, chr.
- new function added, ord.
- new file added, ASCII.
- fixed issues in getCharPosition function
- fixed issues in smartCount function.
- new private function added, called _find_letter_position
- new function added smartCount.
- new function isSubString changed.
- new file added, utils.js.
- old name _parse_tag, new name _parse_char (renamed), private function.
- addstyle2tag improved the function.
- donate botton added.
- New project description.
- lReplace error fixed.
- dummycount error fixed.
- bin file added, make-l-string.web.
- README.md style fixed.
- more keywords added.
- error at method addIdName2Tag and addAttr2Tag fixed.
- README.md style fixed.
- error at method addStyle2Tag fixed.
- README.md style fixed
- error at method add2TagClassName fixed.
- README.md style fixed.
- new html example added.
- README.md style fixed.
- README.md style fixed.
- html support.
- new l-string module ==> l-string.web.js, run onthe browser.
- dummyAddTag and smartAddTag deleted.
- now, there's only one way to use l-string.
- new dependencies cheerio
- new function trimPrefix
- old name add2TagClassName, new name addClassName2Tag (renamed)
- old name add2TagIdName, new name addIdName2Tag (renamed)
- old name add2TagStyle, new name addStyle2Tag (renamed)
- old name add2TagAttr, new name addAttr2Tag (renamed)
- new private function added.
- escape update it.
- new documentation style add it to all functions.
- add2Tag update it.
- new documentation style add it to all functions.
- new examples added.
- new function added it, addAttr2Tag.
- new variable declaration style, added it.
- new examples added.
- issues in method insert fixed.
- new README.md style added.
Leonardo Javier Esparis Meza ==> leo.leo.leoxnidas.c.14@gmail.com
FAQs
this is a module that you can use to manipulate strings ...
The npm package l-string receives a total of 15 weekly downloads. As such, l-string popularity was classified as not popular.
We found that l-string 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.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.