
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
lodash-listfindandremove
Advanced tools
Extend lodash to remove a matching item from a string containg a delimited list.
Extends Lodash to search a delimited string and remove any occurrences of a specified value.
Returns a new string with the specified values removed, the original string is unchanged.
Arguments
list (string): The string containing the delimited list to be search. Required.
target (string): The value to remove from the list. Matching is case-sensitive. Required.
[delimiter] (string): The optional character used to delimit items in the list. When none is supplied a comma (,) is used.
Returns
(string): Returns a string containing the delimited list with all occurrences of the target removed.
var _ = require('lodash')
require('lodash-listfindandremove')
_.listFindAndRemove(d,a,b,c,d,e,d,f,d', 'd') // 'a,b,c,e,f'
_.listFindAndRemove('d,a,b,c,D,e,d,f,d', 'd') // 'a,b,c,D,e,f'
_.listFindAndRemove('d~a~b~c~d~e~d~f~d', 'd', '~') // 'a~b~c~e~f'
_.listFindAndRemove('a,b,c,d,e,f', 'z') // 'a,b,c,d,e,f'
_.listFindAndRemove('a|b|c|d|e|f|xyz', 'z', '|') // 'a|b|c|d|e|f|xyz'
_.listFindAndRemove('', 'a') // ''
_.listFindAndRemove('1,2,3,100,4,1,5', '1') // '2,3,100,4,5'
Version | Release Date | Details |
---|---|---|
1.0.2 | 25th February, 2018 | An extra character had snuck into one of the links meaning the badge was correct but clicking on it didn't give the expected result. No functionality changes. |
1.0.1 | 25th February, 2018 | Added 2 new badges to the README (Known Vulnerabilities & NPM Version) and this Version History. No functionality changes. |
1.0.0 | 24th February, 2018 | Initial release. |
FAQs
Extend lodash to remove a matching item from a string containg a delimited list.
The npm package lodash-listfindandremove receives a total of 9 weekly downloads. As such, lodash-listfindandremove popularity was classified as not popular.
We found that lodash-listfindandremove 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.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.