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.
@a-la/markers
Advanced tools
A set of service markers used by alamode, e.g., to cut and paste comments.
@a-la/markers
is a set of service markers used by alamode
, e.g., to cut and paste comments.
yarn add -D @a-la/markers
npm i @a-la/markers --save-dev
The package is available by importing its default function:
import makeRules from '@a-la/markers'
makeRules(
rules?: !Array<!_restream.Rule>,
): !Array<!_restream.Rule>
This function will surround the rules with cut and paste rules for markers, to exclude from transforms:
[!] Important The current implementation does not support the following:
// the // will be considered to be a comment and break the process
// because the string literal will not be complete without the closing `
const noLink = `https://${host}/test`
export { noLink }
/* yarn example/ */
import makeRules from '@a-la/markers'
const { rules, markers } = makeRules([
{
re: 'ALAMODE_RULE',
replacement(match) {
return match
},
},
])
console.log('\nRules:')
console.log(rules)
console.log('\nMarkers:')
console.log(markers)
Rules:
[
{ re: /\/\*(?:[\s\S]+?)\*\//g, replacement: [Function: replacement] },
{ re: /`([\s\S]*?)`/gm, replacement: [Function: replacement] },
{ re: /./, replacement: [Function: replacement] },
{ re: 'ALAMODE_RULE', replacement: [Function: replacement] },
{
re: /%%_RESTREAM_LITERALS_REPLACEMENT_(\d+)_%%/g,
replacement: [Function: replacement]
},
{
re: /%%_RESTREAM_COMMENTS_REPLACEMENT_(\d+)_%%/g,
replacement: [Function: replacement]
}
]
Markers:
{
literals: {
name: 'literals',
re: /`([\s\S]*?)`/gm,
regExp: /%%_RESTREAM_LITERALS_REPLACEMENT_(\d+)_%%/g,
getReplacement: [Function: getDefaultReplacement],
map: {},
lastIndex: 0
},
comments: {
name: 'comments',
re: /\/\*(?:[\s\S]+?)\*\//g,
regExp: /%%_RESTREAM_COMMENTS_REPLACEMENT_(\d+)_%%/g,
getReplacement: [Function: getDefaultReplacement],
map: {},
lastIndex: 0
}
}
© Art Deco™ for À La Mode 2020 |
---|
FAQs
A set of service markers used by alamode, e.g., to cut and paste comments.
The npm package @a-la/markers receives a total of 11 weekly downloads. As such, @a-la/markers popularity was classified as not popular.
We found that @a-la/markers 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
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.