Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shashikumarraja/naughty-string-validator
A node.js library that returns naughty strings from an offline database of Big List of Naughty Strings and emojis.
https://github.com/shashikumarraja/naughty-string-validator
emojis hactoberfest naughty-strings nodejs npm-package testing unicode-characters
Last synced: about 1 month ago
JSON representation
A node.js library that returns naughty strings from an offline database of Big List of Naughty Strings and emojis.
- Host: GitHub
- URL: https://github.com/shashikumarraja/naughty-string-validator
- Owner: shashikumarraja
- License: mit
- Created: 2018-08-25T14:17:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-28T11:56:17.000Z (over 4 years ago)
- Last Synced: 2024-11-08T15:51:08.650Z (about 2 months ago)
- Topics: emojis, hactoberfest, naughty-strings, nodejs, npm-package, testing, unicode-characters
- Language: JavaScript
- Homepage:
- Size: 52.7 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# naughty-string-validator
[![Build Status](https://travis-ci.org/shashikumarraja/naughty-string-validator.svg?branch=master)](https://travis-ci.org/shashikumarraja/naughty-string-validator)
[![Coverage Status](https://coveralls.io/repos/github/shashikumarraja/naughty-string-validator/badge.svg?branch=master)](https://coveralls.io/github/shashikumarraja/naughty-string-validator?branch=master)
[![npm version](https://badge.fury.io/js/naughty-string-validator.svg)](https://badge.fury.io/js/naughty-string-validator)
![npm](https://img.shields.io/npm/dt/naughty-string-validator.svg)
[![dependencies Status](https://david-dm.org/shashikumarraja/naughty-string-validator/status.svg)](https://david-dm.org/shashikumarraja/naughty-string-validator)
[![devDependencies Status](https://david-dm.org/shashikumarraja/naughty-string-validator/dev-status.svg)](https://david-dm.org/shashikumarraja/naughty-string-validator?type=dev)
[![Known Vulnerabilities](https://snyk.io/test/github/shashikumarraja/naughty-string-validator/badge.svg?targetFile=package.json)](https://snyk.io/test/github/shashikumarraja/naughty-string-validator?targetFile=package.json)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Inline docs](https://inch-ci.org/github/shashikumarraja/naughty-string-validator.svg?branch=master)](http://inch-ci.org/github/shashikumarraja/naughty-string-validator)
===A node.js library that returns `naughty strings` from an offline database of [Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings) and emojis. The db will be continuously growing with each release.
The Big List of Naughty Strings is an evolving list of strings which have a high probability of causing issues when used as user-input data.
This library can be inluded in the test automation framework for API, UI, or DB testing to validate them against naughty strings.
## Installation
`npm install naughty-string-validator`
## Usage
```javascript
var naughty = require('naughty-string-validator');
```
* To get a random naughty string from the list
```javascript
var randomNaughty = naughty.getRandomNaughtyString();//randomNaughty
"test"
```* To get entire naughty string list
```javascript
var naughtyList = naughty.getNaughtyStringList();//naughtyList
["", "undefined", "undef", "null", "NULL", "(null)", "nil", β¦]
```
* To get a random emoji from the emoji list
```javascript
var randomEmoji = naughty.getRandomEmoji();//randomEmoji
"π"
```
* To get a entire emoji list
```javascript
var emojiList = naughty.getEmojiList();//emojiList
["π", "π", "π", "π", "π", "π ", "π", "π€£", "βΊοΈ", "π", β¦]
```
* To get emoji list of a particular category:`'People', 'Nature', 'Foods', 'Activity', 'Places', 'Objects', 'Symbols', 'Flags'`
```javascript
var emojiList = naughty.getEmojiList('Flags');//emojiList
['π³οΈ', 'π΄', 'π', 'π©', 'π³οΈβπ', 'π¦π«', 'π¦π½','π¦π±', β¦]//if the emoji category doesn't exist, you will get the entire emoji list
```## Tests
```shell
//To run test with linting
npm test//Test with coverage
npm run cover
```## β Roadmap
- [ ] Add Support to return naughtified json data from json schema
- [x] Add Support for emoji
- [ ] Add Support to get a desired emoji by name
- [ ] Add Support to get NaughtyStringList of a given length
- [ ] Add Support for mocha and chai integration
- [ ] Add Support to get list of stickersIf you think you can contribute to any of the roadmap or suggest something new, you can contribute to this project by opening a pull request.