Package to print some random fruit I eat.

Usage no npm install needed!

<script type="module">
  import eatFruit from '';


🍉 Eat Fruit

Package to print some random fruit I eat.

This repository contains the source code for my tutorial: Bundling Your JavaScript Library with Rollup.

In that tutorial, you'll learn how to bundle your JavaScript library using Rollup:

  • Learn various output formats
  • Rollup configuration file
  • Three-shaking feature
  • Working with a third-party library from NPM
  • Integrating Babel with Rollup
  • Minifying bundle file
  • Publishing bundles to NPM


Run the following command to install this package through NPM:

$ npm i eat-fruit

# Or if you use Yarn
$ yarn add eat-fruit

You can also use this library on the browser directly:

<!-- For development -->
<script src=""></script>

<!-- Minified version for production -->
<script src=""></script>

Quick Start

On Node.js:

const eatFruit = require('eat-fruit');

eatFruit(); // "I eat 🍉."

If you load the umd bundle on the browser, you can access the eatFruit function globally:

window.eatFruit(); // "I eat 🍉."

// Or simply


MIT © Risan Bagja Pradana