Giter Site home page Giter Site logo

open-benthic / random-fruits Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 212 KB

generate some random fruits that works anywhere! ๐ŸŽฒ๐Ÿ‰๐Ÿ๐ŸŽ‰

Home Page: https://www.npmjs.com/package/random-fruits

License: MIT License

JavaScript 100.00%
random-generator string-generator random-fruits-generator random-eat-fruits babel rollup random-fruits javascript-library random-emoji

random-fruits's Introduction

Random Fruits Generator ๐ŸŽฒ๐Ÿ

Random Fruits is a simple javascript library that generates some random fruits and it could be used in both browser and nodejs enviroments.

Installation

install via node :

$ npm i random-fruits

# Or if you use Yarn
$ yarn add random-fruits

You can also use this library on the browser directly:

<!-- For development -->
<script src="https://unpkg.com/random-fruits/dist/random-fruits.umd.js"></script>

<!-- Minified version for production -->
<script src="https://unpkg.com/random-fruits/dist/random-fruits.umd.min.js"></script>

Quick Start

On Node.js:

const randomFruits = require('random-fruits');

randomFruits.roll(); // "๐Ÿ‰"

randomFruits.rollThree(); // "๐Ÿ‡,๐Ÿ,๐Ÿ‹"

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

window.randomFruit.roll(); // "๐Ÿ"

// Or simply
randomFruit.roll();

randomFruit.rollThree();

you can use import syntax either :

import { roll, rollThree } from 'random-fruits';

roll(); // ๐Ÿ

rollThree(); // ๐Ÿฅญ,๐Ÿ“,๐ŸŒ

Tech stack

Notes

supported enviroments :

last 2 version
> 5%
not dead
maintained node versions

uses rollup for ES Modules bundling and babel for coverting es2015+ code to es5.

also uses node-resolve plugin to compile cjs code to es module compatible ones for tree-shaking purposes done automatically by rollup.

lodash can be used as peer dependency.

Contributing

contributers welcomed here! ๐Ÿ˜€๐Ÿ™Œ you can easily fork this project , add your changes and create pull request .

Roadmap

  • typescript support
  • tests
  • fruits slot machine
  • roll returns fruits as much as you want
  • dockerfiles
  • reduce project bundle size
  • UI component for react
  • create a blog post on DEV.to or Medium
  • animations
  • random-emojis

Helpful Links

wesbos - javascript modules bundling your javascript library with rollup

License

developed and maintained under MIT license ยฉ Benthic

random-fruits's People

Contributors

clrcode avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.