npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jira2slack

v1.2.0

Published

Library to convert between JIRA markup and Slack markup

Downloads

596

Readme

JIRA 2 Slack

npm version Build Status Coverage Status js-semistandard-style

Library to convert between JIRA markup and Slack markup

Example

const J2S = require('jira2slack');

const slackMD = J2S.toSlack('*This* _is_ -some- ^over^ ~formatted~ {{text}}');
// *This* _is_ ~some~ ^over -formatted- `text`

Conversions

Below are the conversions that are made:

Jira -> Slack

| Format | JIRA | Slack | Destructive | Notes | | ------ | ---- | ----- | ----------- | ----- | | Headers | h1. Heading | \n *Heading*\n | Yes | Slack doesn't support headers so library converts headers to bolded text on it's own line | | Bold | *bold* | *bold* | Sometimes | [1] | | Italic | _italic_ | _italic_ | Sometimes | [1] | | Unordered List | * Bulleted List** Indented more* Indented less | • Bulleted List..• Indented more• Indented less | No | [2] | | Unordered Dash List | - Bulleted Dash List- Bulleted Dash List- Bulleted Dash List | • Bulleted Dash List• Bulleted Dash List• Bulleted Dash List | Yes | Ambigious result from Bulleted list so reversal results in use of astericks | |Ordered List | # Numbered List## Indented more## Indented more### Indented morer### Indented morer### Indented morer## Indented more# Indented less | 1. Numbered List..1. Indented more..2. Indented more....1. Indented morer....2. Indented morer....3. Indented morer..3. Indented more2. Indented less | No | [1][2] | | Monospaced | {{code}} | `code` | No | | | Citations | ??citation?? | -- citation_ | Yes | Slack doesn't have citations, but I can replicate resulting format | | Subscript | ~subscript~ | _subscript | Yes | Slack doesn't have subscript, but I denote it with a single underscore | | Superscript | ^superscript^ | ^superscript | Yes | Slack doesn't have superscript, but I denote it with a single carret | | Strikethrough | -strikethrough- | ~strikethrough~ | Sometimes | [1] | | Code | {code}some code{code} | ```some code``` | Yes | Slack doesn't support specify the language, so that is removed during conversion | | Quotes | {quote}quoted text{quote} | ```quoted text``` | Yes | Slack does't support quoted text so the library uses preformmated ``` instead. This makes it impossible to convert back. | | Pre-formatted Text | {noformat}pre text{noformat} | ```pre text``` | Yes | Slack does't support no format text so the library uses preformmated ``` instead. This makes it impossible to convert back. | | Unnamed Link | [http://someurl.com] | <http://someurl.com> | No | | | Named Link | [Someurl\|http://someurl.com] | <http://someurl.com\|Someurl> | No | | | Smart Link | [http://someurl.com\|http://someurl.com\|smart-link] | <http://someurl.com> | Yes | Slack doesn't support smart links so we just strip it down to a regular link | | Blockquote | bq. This is quoted | > This is quoted | Sometimes | Slack doesn't support multi-line blockquotes (>>>) so those are ignored | | Color | {color:white}This is white text{color} | This is white text | Yes | Slack doesn't support colored text so it is removed. | | Panel | {panel:title=foo}Panel Contents{panel} | Panel: | foo || --- || Panel Contents | | Yes | Slack doesn't support panels, so the library attempts to replicate the format. This makes it impossible to convert back. | | Table | ||heading 1||heading 2|||col A1|col B1||col A2|col B2| | |heading 1|heading 2|| --- | --- ||col A1|col B1||col A2|col B2| | No | |

Notes

  1. JIRA supports spaces at the beginning and end of a markdown section (ex _ foo _) where Slack does not. To match the formatting, the library moves those spaces outside the formatter (ex _ foo _ becomes _foo_). While the result works in both JIRA and Slack, it is technically destructive.
  2. . indicate whitespace ( ), not a literal .

Slack -> Jira

| Format | Slack | Jira | Destructive | Notes | | ------ | ---- | ----- | ----------- | ----- | | Headers | \n *Heading*\n | h1. Heading | No | | | Bold | *bold* | *bold* | No | | | Italic | _italic_ | _italic_ | No | | | Unordered List | • Bulleted List..• Indented more• Indented less | * Bulleted List** Indented more* Indented less | No | [2] | |Ordered List | 1. Numbered List..1. Indented more..2. Indented more....1. Indented morer....2. Indented morer....3. Indented morer..3. Indented more2. Indented less | # Numbered List## Indented more## Indented more### Indented morer### Indented morer### Indented morer## Indented more# Indented less | No | [2] | | Monospaced | `code` | {{code}} | No | | | Citations | -- citation_ | ??citation?? | No | | | Strikethrough | ~strikethrough~ | -strikethrough- | No | | | Code | ```some code``` | {code}some code{code} | No | | | Unnamed Link | <http://someurl.com> | [http://someurl.com] | No | | | Named Link | <http://someurl.com\|Someurl> | [Someurl\|http://someurl.com] | No | | | Blockquote | > This is quoted | bq. This is quoted | No | |

Acknowledgments

Special thanks to Kyle Farris for his JIRA to Markdown library

Contributing

  1. Create a new branch, please don't work in master directly.
  2. Add failing tests for the change you want to make (if applicable). Run npm test to see the tests fail.
  3. Fix stuff.
  4. Run npm test to see if the tests pass. Repeat steps 2-4 until done.
  5. Update the documentation to reflect any changes.
  6. Push to your fork and submit a pull request.