Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
A tiny tool that helps to find strings in pre-defined dictionary by user input.
It uses algorithm similar to one that IDEs use when user looks for a file by some parts of the file's name.
For example, it finds string aTinyTool
when input is att
.
yarn add micromys
or npm install micromys
import { createSearchFunction } from 'micromys';
const search = createSearchFunction(['myFavoriteFile', 'i_love_underscores']);
const searchResults = search('ilo');
console.log(searchResults);
// [{
// sentence: 'i_love_underscores',
// highlights: [
// { start: 0, end: 0 },
// { start: 2, end: 3 },
// ],
// }]
You can think of this module as of a constructor.
Feel free to import any parts of micromys
and to build something new from them.
You can start from createSearchFunction.js
- the place that wires all the sub parts.
For example, you can provide your own custom isLetter
function in order to add support for languages with non-latin alphabets.
In order to simplify highlighting implementation there is highlightSentence
function.
import { highlightSentence } from 'micromys/src/highlightSentence';
const highlighted = highlightSentence({
sentence: 'some words',
highlights: [{ start: 0, end: 3 }],
highlight: (text) => `<b>${text}</b>`,
}).join('');
console.log(highlighted); // '<b>some</b> words'
If you need to require
instead of import
, use require('micromys/cjs');
By default micromys
supports only latin alphabet. If you need more, see Advanced
section above.
FAQs
Helper for IDE-like search widgets implementations
We found that micromys 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.