dallmo-bacon-ipsum
v2.0.0
Published
- a simple wrapper based on the json api by [bacon ipsum][link-bacon-ipsum], and output only the random texts for direct use. - compatible with both cjs and esm, by following [the advice of a post by Dan Fabulich][ref-1]
Downloads
4
Readme
dallmo-bacon-ipsum
- a simple wrapper based on the json api by bacon ipsum, and output only the random texts for direct use.
- compatible with both cjs and esm, by following the advice of a post by Dan Fabulich
usage
the package export a promise, which will resolve either to the random words by bacon ipsum, or related error messages.
cjs
const promise_ipsum = require("dallmo-bacon-ipsum");
promise_ipsum.then( rand_string => {
console.log( "rand_string : ", rand_string );
});
esm
import {dallmo_bacon_ipsum} from 'dallmo-bacon-ipsum';
const result = await dallmo_bacon_ipsum;
console.log( "result : ", result );