UNPKG

demotivator

Version:

A extremely large array of 300+ insults so you can integrate the power of (de)Motivator into your webapp.

98 lines 3.12 kB
/** * @license * Copyright 2024, PorkyProductions, and contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { insults } from './insults'; import generateInsult, { insultAt } from './generateinsult'; import { type __DeMotivator, type Insult, type CreateArrayConfig } from './typings'; export { insults, generateInsult, insultAt, type Insult, type CreateArrayConfig }; /** * createArray is a new function itroduced in version 12 that creates a custom insult array based on a configuration you provide. * @param {CreateArrayConfig} configuration an object that has two properties: profane, and original. Both of which accept a boolean value * @since 12.0.0 * @see CreateArrayConfig * @returns {Insult[]} an array of insults */ export declare const createArray: (configuration: CreateArrayConfig) => Insult[]; /** * The main deMotivator object. * Contains all the functions and properties of the deMotivator. * @date 6/15/2023 - 11:37:58 AM * @export * @type {__DeMotivator} */ export declare const deMotivator: __DeMotivator; export default deMotivator; /** * A class version of the `deMotivator` object * @see deMotivator * @export * @class DeMotivator * @typedef {DeMotivator} * @implements {__DeMotivator} */ export declare class DeMotivator implements __DeMotivator { /** * The entire insults array * @date 6/15/2023 - 11:39:04 AM * * @type {Insult[]} */ insults: Insult[]; /** * All of the profane insults * @date 6/15/2023 - 11:39:04 AM * * @type {Insult[]} */ profaneInsults: Insult[]; /** * Creates a basic array of insults. * @date 6/15/2023 - 11:39:04 AM * @internal * @private * @returns {Insult[]} */ private __createBasicArray; /** * Creates a custom insult array based on a configuration you provide. * @date 6/15/2023 - 11:39:04 AM * @external * @public * @param {CreateArrayConfig} configuration * @returns {Insult[]} */ createArray(configuration: CreateArrayConfig): Insult[]; /** * Grabs a random insult from the insults array. * @date 6/15/2023 - 11:39:04 AM * * @public * @param {Insult[]} [array=this.__createBasicArray()] * @returns {Insult} */ generateInsult(array?: Insult[]): Insult; /** * Gets an insult at a specific position in the insults array. * @date 6/15/2023 - 11:39:04 AM * * @public * @param {number} position * @param {Insult[]} [array=this.__createBasicArray()] * @returns {Insult} */ insultAt(position: number, array?: Insult[]): Insult; } //# sourceMappingURL=index.d.ts.map