Skip to main content


After installing string-factory, using it is as simple as importing (or requiring) the function at the top of your project or component file.

ES Modules

import { sarcasm } from 'string-factory';

Then you can use it normally, like you would any other function. Here's a React.js example.

import React from 'react';
import { sarcasm } from "string-factory";

function MyComponent() {
return (
<p>{dateNow("wow so funny")}</p>

Check out a live ESM demo of this function on StackBlitz.

Open string-factory demo in StackBlitz


const { sarcasm } = require('string-factory');

console.log(sarcasm("wow so funny"));