
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
botkit-helper-slack
Advanced tools
Never have to look up how to use bold, italics, strikethrough, code
, pre
... formats again for Slack API (I still had to look it all up for this Github Markdown though).
$ npm install --save botkit-helper-slack
var SS = require('botkit-helper-slack');
SS('My Emphatic Decree!').italic() // -> '_My Emphatic Decree!_' (in Slack italics)
// or
SS.extendPrototype()
'var meta = x'.slackCode() // -> '`var meta = x`' (in Slack code format)
Calling extendPrototype()
will extend the Javascript String
prototype, but in order to not poison the
String
namespace, each function name will start with 'slack' and maintain camelCase format
e.g. italic -> slackItalic
SS('I really need to italicize this').italic() //-> "_I really need to italicize this_"
// or extend the String prototype
SS.extendPrototype()
'and this one'.slackItalic() //-> "_and this one_"
Italicizes your string according to Slack format
'italics'
-> '_italics_'
italics
Bolds your string according to Slack format
'bold'
-> '*bold*'
bold
Makes your string look like code
according to Slack format
'code'
-> '`code`'
code
Makes your string look like pre-formatted fixed width text
according to Slack format
'pre'
-> '```pre```'
pre
Strikes through your string, according to Slack format
'strike'
-> '~strike~'
strike
Creates a single line quote. This function does not surround your string with quotes.
'quote'
-> '> quote'
quote
Creates a multi-line quote.
'paragraph'
-> '>>> paragraph'
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
Formats your string into Slack emoji style.
('Do NOT Litter').emoji( ) //-> ':do_not_litter:'`
:do_not_litter:
Formats your user ID into Slack's desired format
'U112233'
-> '<@U112233>'
Formats your channel ID into Slack's desired format
'C445566'
-> '<@C445566>'
Will create message linking to the subteam ID viewed as required @handle
// having called extendPrototype()
'S289524'.slackSubteam('the-homies') //-> '<!subteam^S289524|the-homies>'
Formats your date using optional options
. Date can be a seconds since the epoch, a string, or an instance of Date
SS(1526249506).date() // -> '<!date^1526249506^{date}|Sun, 13 May 2018 22:11:46 GMT>'
SS(new Date()).date()
SS('2018-05-13').date()
var options = {format: '{date} at {time}', link: 'http://example.com', fallback: 'Some great date'};
SS('1526249506').date(options) // -> '<!date^1526249506^{date} at {time}^http://example.com|Some great date>');
// having called extendPrototype()
'2018-05-13'.slackDate(options)
Creates a formatted link displayed as optional handle
// having called extendPrototype()
'https://mfix22.github.io'.slackUrl('My Portfolio') //-> '<https://mfix22.github.io/|My Portfolio>'
Creates a formatted mailto: email link displayed at handle
// having called extendPrototype()
'admin@squadup.io'.slackEmail('Email Me') //-> '<mailto:admin@squadup.io|Email Me>'
See get('here')
See get('everyone')
See get('group')
See get('channel')
Formats your HTML code using Slack desired format.
SS('<div></div>').html() //-> '<div></div>
Other functions to help you format Slack messages
Will return the corresponding string value
for each key
below.
key | value (string) |
---|---|
'bullet' | • |
'here' | |
'channel' | |
'group' | |
'everyone' |
$ npm test
FAQs
Never lookup the Slack formatting markup again
The npm package botkit-helper-slack receives a total of 0 weekly downloads. As such, botkit-helper-slack popularity was classified as not popular.
We found that botkit-helper-slack 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.