@shehabtweel99/functionkit
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

functionKit latest version | npm development dependency security check | David DM GitHub Workflow Status

A package with functions for example, sum 2 numbers

Install

npm i functionKit

or

npm install functionKit

Usage

Importing

From one file

import { sum, subtract, greet, divide } from 'functionKit';
// Or this
const { sum, subtract, greet, divide } = require('functionKit');

From separate files

import { greet } from 'functionKit/lib/greeter';
// Or this
const { greet } = require('functionKit/lib/greeter');

//                                                             ^
// You can put any of them. As long as they look similar above |

How-to

// Greeter
console.log(greet('Shehab'));
          // Hello Shehab
// Custom Greeting
console.log(greet('Shehab', 'Welcome back,'));
                          // Welcome back, Shehab

// Math
// sum (add)
   console.log(sum(1, 1));
   // 2
   // Same as: 1 + 1
// subtract (the opposite of sum)
   console.log(subtract(1, 3));
   // 3
   // Same as: 1 - 3
// Divide (i can't simplify it.)
   console.log(divide(55, 11));
   // 5
   // Same as: 55 / 11

Readme

Keywords

none

Package Sidebar

Install

npm i @shehabtweel99/functionkit

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

5.04 kB

Total Files

13

Last publish

Collaborators

  • shehabtweel99