# snowflake-regex

> Generates a regex to match Discord snowflakes

Latest version **1.0.4** (published 2022-02-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install snowflake-regex
pnpm add snowflake-regex
yarn add snowflake-regex
bun add snowflake-regex
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-02-15 |
| First published | 2021-09-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Commandtechno |
| Maintainers | commandtechno |
| Keywords | discord, snowflake, regex, discord.js, discord, snowflake |

## Links

- npm: https://www.npmjs.com/package/snowflake-regex
- Repository: https://github.com/commandtechno/snowflake
- Homepage: https://github.com/commandtechno/snowflake#readme
- Issues: https://github.com/commandtechno/snowflake/issues
- npm.io page: https://npm.io/package/snowflake-regex

## Recent versions

- 1.0.4 (latest) — 2022-02-15
- 1.0.3 — 2022-02-15
- 1.0.2 — 2022-02-13
- 1.0.1 — 2021-09-13
- 1.0.0 — 2021-09-13

## README

![Snowflake](https://util.bruhmomentlol.repl.co/twemoji/snowflake)

# Snowflake Regex

Generates a regex for Discord Snowflakes, its pretty simple

# Usage

```js
const snowflakeRegex = require("snowflake-regex"); // For ES6/TS use import snowflakeRegex, { generate } from 'snowflake-regex'
snowflakeRegex.default.test("296776625432035328"); // true
snowflakeRegex.default.test("balls 296776625432035328"); // false

const customSnowflakeRegex = snowflakeRegex.generate({
  exact: false,
  global: true,
  multiline: true
});

customSnowflakeRegex.test("balls 296776625432035328"); // true
"balls 296776625432035328".match(customSnowflakeRegex); // [ '296776625432035328' ]
"balls 296776625432035328".match(snowflakeRegex.default); // null
```

---
_Source: https://npm.io/package/snowflake-regex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
