├── .nvmrc ├── .gitignore ├── .gitattributes ├── .prettierrc ├── .editorconfig ├── index.mjs ├── .github └── workflows │ └── main.yml ├── index.js ├── test.js ├── license ├── package.json ├── titles.json └── readme.md /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/jod 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /index.mjs: -------------------------------------------------------------------------------- 1 | import random from 'unique-random-array' 2 | import titles from './titles.json' with { type: 'json' } 3 | 4 | export const fst = ([x, _]) => x 5 | export const snd = ([_, x]) => x 6 | const constant = (x) => () => x 7 | const when = (cond, f) => ifElse(cond, f, (x) => x) 8 | const ifElse = (cond, t, f) => (x) => cond(x) ? t(x) : f(x) 9 | const select = (predicate) => ifElse(constant(predicate), snd, fst) 10 | const extract = ({ female }) => when(Array.isArray, select(female)) 11 | 12 | export default (config = {}) => extract(config)(random(titles)()) 13 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Read .nvmrc 15 | run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV 16 | 17 | - name: Setup node 18 | uses: actions/setup-node@v4 19 | with: 20 | node-version: ${{ env.NVMRC }} 21 | cache: 'npm' 22 | - run: npm ci 23 | - run: npm run build --if-present 24 | - run: npm test 25 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const random = require('unique-random-array') 2 | const titles = require('./titles.json') 3 | 4 | const fst = ([x, _]) => x 5 | const snd = ([_, x]) => x 6 | const constant = x => () => x 7 | const when = (cond, f) => ifElse(cond, f, x => x) 8 | const ifElse = (cond, t, f) => x => (cond(x) ? t(x) : f(x)) 9 | const select = predicate => ifElse(constant(predicate), snd, fst) 10 | const extract = ({ female }) => when(Array.isArray, select(female)) 11 | 12 | module.exports = (config = {}) => extract(config)(random(titles)()) 13 | module.exports.fst = fst 14 | module.exports.snd = snd 15 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava' 2 | import getTitle, { fst, snd } from './index.mjs' 3 | 4 | import titles from './titles.json' with { type: 'json' } 5 | 6 | const dupe = (x) => (Array.isArray(x) ? x : [x, x]) 7 | const dupeTitles = titles.map(dupe) 8 | const maleTitles = dupeTitles.map(fst) 9 | const femaleTitles = dupeTitles.map(snd) 10 | 11 | test('main', (t) => { 12 | const first = getTitle() 13 | t.true(first.length > 0) 14 | t.not(first, getTitle(), 'should never repeat titles') 15 | }) 16 | 17 | test('config({female: true})', (t) => { 18 | const config = { female: true } 19 | t.not(maleTitles.includes(getTitle(config))) 20 | t.true(femaleTitles.includes(getTitle(config))) 21 | }) 22 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright © Flavio Corpa (flaviocorpa.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "superb-developer-titles", 3 | "version": "1.2.1", 4 | "description": "Get random cool/funky/weird developer titles 🦄", 5 | "license": "MIT", 6 | "type": "module", 7 | "repository": "kutyel/superb-developer-titles", 8 | "exports": { 9 | ".": [ 10 | { 11 | "import": "./index.mjs", 12 | "require": "./index.js", 13 | "default": "./index.js" 14 | } 15 | ] 16 | }, 17 | "author": { 18 | "name": "Flavio Corpa", 19 | "email": "flaviocorpa@gmail.com", 20 | "url": "https://flaviocorpa.com" 21 | }, 22 | "engines": { 23 | "node": ">=22" 24 | }, 25 | "scripts": { 26 | "test": "ava" 27 | }, 28 | "files": [ 29 | "index.js", 30 | "index.mjs", 31 | "titles.json" 32 | ], 33 | "keywords": [ 34 | "superb", 35 | "awesome", 36 | "titles", 37 | "developer", 38 | "cool", 39 | "funky", 40 | "word", 41 | "words", 42 | "list", 43 | "array", 44 | "random" 45 | ], 46 | "dependencies": { 47 | "unique-random-array": "^1.0.0" 48 | }, 49 | "devDependencies": { 50 | "ava": "*", 51 | "braces": "*", 52 | "js-yaml": "*" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /titles.json: -------------------------------------------------------------------------------- 1 | [ 2 | "code janitor", 3 | "crack", 4 | ["djinn", "jinniyah"], 5 | "engineer", 6 | "expert", 7 | "freddy mercury of code", 8 | "full time nerd", 9 | "fullstack developer", 10 | "genie", 11 | "guru", 12 | "hero", 13 | "jedi", 14 | "life saver", 15 | ["master googler", "mistress googler"], 16 | ["master", "mistress"], 17 | "nerd", 18 | "ninja", 19 | "problem solver", 20 | "resolver", 21 | "rockstar", 22 | "royal developer", 23 | ["señor dev", "señora dev"], 24 | "sensei", 25 | ["semigod", "semigoddess"], 26 | ["shinobi", "kunoichi"], 27 | "superhero", 28 | "tidy-upper", 29 | "unicorn", 30 | ["wizard", "wizardess"], 31 | "coder", 32 | "lost semicolon", 33 | "tester", 34 | "bug", 35 | "hardcore", 36 | "undefined is not a function", 37 | "owl", 38 | "pizza", 39 | "coffee maker", 40 | "legendary", 41 | "blessed", 42 | ["the PC guy", "the PC girl"], 43 | "the flash", 44 | "magician", 45 | "yeah", 46 | "crazy", 47 | "potatoes", 48 | "coffee", 49 | "code machine", 50 | "look mom no hands!", 51 | "cat", 52 | "assembler", 53 | "fries", 54 | "fix my PC?", 55 | ["fat john", "skinny johanna"], 56 | "lord", 57 | ["pizza guy", "pizza girl"], 58 | "compilers! compilers! compilers!", 59 | "docs", 60 | "commit", 61 | "human debugger", 62 | "toxic code", 63 | "professional googler", 64 | "human transpiler", 65 | "machine", 66 | "dark theme", 67 | "puzzle", 68 | "A+", 69 | "milk", 70 | "flying keyboards", 71 | "cookies", 72 | "code reviewer", 73 | "professional sleep guardian" 74 | ] 75 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # superb-developer-titles 2 | 3 | [![Build](https://github.com/kutyel/superb-developer-titles/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/kutyel/superb-developer-titles/actions/workflows/main.yml) 4 | [![npm](https://img.shields.io/npm/v/superb-developer-titles.svg)](https://www.npmjs.com/package/superb-developer-titles) 5 | [![downloads](https://img.shields.io/npm/dt/superb-developer-titles.svg)](https://www.npmjs.com/package/superb-developer-titles) 6 | 7 | > Get random cool/funky/weird developer titles 🦄 8 | 9 | Currently ~30 stupid titles. **🙏 PLEASE FEEL FREE TO ADD MORE! 🙏** 10 | 11 | The word list itself is just a [JSON file](titles.json) and can be used wherever. 12 | 13 | ## WHY 14 | 15 | Because the community _really_ needs it ¯\\\_(ツ)\_/¯ 16 | 17 | ## Install 18 | 19 | ``` 20 | $ npm install superb-developer-titles 21 | ``` 22 | 23 | ## Usage 24 | 25 | ```js 26 | import getTitle from 'superb-developer-titles' 27 | 28 | getTitle() 29 | //=> 'ninja' 30 | ``` 31 | 32 | ## API 33 | 34 | ### default(config = {}) 35 | 36 | Type: `Function` 37 | 38 | Random funky developer title 🎸. 39 | 40 | ### Config options 41 | 42 | #### female (default: `false`) 43 | 44 | Type: `Boolean` 45 | 46 | If `true` will provide the femenine version of the title (in case it's not unisex) 47 | 48 | ## Inspiration 49 | 50 | - Obviously inspired by [Sindre Sorhus](https://sindresorhus.com)'s amazing [superb](https://github.com/sindresorhus/superb) 😉 51 | - Also the awesome [bullshit-job-titles](https://bullg.it/bullshit-job-titles), made by [@bullgit](https://github.com/bullgit) 🐄 52 | 53 | ## Related 54 | 55 | - [superb](https://github.com/sindresorhus/superb) - Get superb like words 56 | - [superb-cli](https://github.com/sindresorhus/superb-cli) - CLI for this module 57 | - [cat-names](https://github.com/sindresorhus/cat-names) - Get popular cat names 58 | - [dog-names](https://github.com/sindresorhus/dog-names) - Get popular dog names 59 | - [pokemon](https://github.com/sindresorhus/pokemon) - Get Pokémon names 60 | - [superheroes](https://github.com/sindresorhus/superheroes) - Get superhero names 61 | - [supervillains](https://github.com/sindresorhus/supervillains) - Get supervillain names 62 | - [yes-no-words](https://github.com/sindresorhus/yes-no-words) - Get yes/no like words 63 | 64 | ## License 65 | 66 | MIT © [Flavio Corpa](http://flaviocorpa.com) 67 | --------------------------------------------------------------------------------