keyword-farmer
v1.0.4
Published
keyword-farmer is quickly and easily generate fake data for mocking
Downloads
8
Maintainers
Readme
keyword-farmer
Overview
If you use this, you are a farmer.
Build and harvest a farm with the crops you want.
Like a farmer tending his farm, create keywords
It will provide you mock keywords data.
Installation
npm install keyword-farmer
Example
import { useKeywordFarm } from 'keyword-farmer';
const { create } = useKeywordFarm();
create();
// output: 'sweater' | 'iphone 14 pro' | 'shirt' ...
Options
interface Config {
lang?: 'en' | 'kr'
length?: number | { min?: number, max?: number }
excludeSpaces?: boolean
specialKeywords?: 'only' | 'mixed' | 'combine'
}
lang
- This is the language of keywords. Currently supportsen
kr
, default isen
length
- Limit the length of keywords to be handled.excludeSpaces
- Whether to exclude spaces in words. The default istrue
(inclusive).specialKeywords
- This is an option to handle special characters (mutations). Special characters are Unicode special characters.only
- The keyword list consists only ofspecialKeywords
. Also other options are ignoredmixed
- Consists of generalkeywords
andspecialKeywords
combine
-keyword
characters containspecialKeywords
combined in random positions.