diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3491a3b..cd1d103 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,16 @@ # Contribution Guidelines 👨‍🏫🏗 -This documentation contains a set of guidelines to help you during the contribution process. We are happy to welcome all the contributions from anyone willing to improve/add new scripts to this project. Thank you for helping out and remember, no contribution is too small. +This documentation contains a set of guidelines to help you during the contribution process. We are happy to welcome all the contributions from anyone willing to improve/add new scripts to this project. Thank you for helping out and remember, no contribution is too small. + +Make documentation for each module which is creative and also give some similar modules in reference. Provide pros and cons for the respective modules. Are we missing any of your favorite modules, which you think you can add to it? We invite you to contribute to this project and make it better. + +You can also make your own user defined module and show the world its potential by adding it to Npm Box . + +You may update any previously contributed module and make it more healthy for people . + To start contributing, follow the below guidelines. ## Step 1: Find a issue @@ -17,9 +24,9 @@ To start contributing, follow the below guidelines. ## Step 2: Fork the Project - Fork this Repository. This will create Local Copy of this Repository on your Github Profile. Keep a reference to the original project in upstream remote. ``` -$ git clone https://github.com//LearnCPP -$ cd LearnCPP -$ git remote add upstream https://github.com/Lakhankumawat/LearnCPP +$ git clone https://github.com//npmBox +$ cd npmBox +$ git remote add upstream https://github.com//npmBox ```

@@ -68,7 +75,6 @@ $ git push -u origin Branch_Name ## Step 7 : Pull Request - Go to your repository in browser and click on compare and pull requests. Then add a title and description to your pull request that explains your contribution. - - Voila! Your Pull Request has been submitted and will be reviewed by the moderators and merged.🥳
diff --git a/README.md b/README.md index 9c4ab59..a2307b8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Overview -This repository contains/will contains various npm modules that you can tweak according to your needs ans use them in your projects. Our objective is to create the largest collection of npm packages with proper documentation. +This repository contains/will contains various existing npm modules and user defined modules that you can tweak according to your needs ans use them in your projects. . Our noble aim is to craft the grandest repository of npm packages, complete with proper documentation. So, What are you waiting for? 🤔 @@ -37,62 +37,62 @@ So, What are you waiting for? 🤔 | | Name of Package | npmjs URL | Doc. URL | | ------- | ------------------------------------------ | ------------------------------------ | ----------------------------- | -| **---** | **A** | +| | **A** | | | [Async](./Async) | https://www.npmjs.com/package/async | https://caolan.github.io/async/v3/ | | | [Axios](./Axios/) | https://www.npmjs.com/package/axios | https://axios-http.com/ | -| **---** | **B** | | | +| | **B** | | | | | [Bcrypt](./Bcrypt) | | | | | [browserify](./Browserify) | | | -| **---** | **C** | | | +| | **C** | | | | | [Cloudinary](./Cloudinary/) | | | | | [Chalk](./chalk/) | | | -| **---** | **D** | | | +| | **D** | | | | | [Debug](./debug) | | | -| **---** | **E** | | | +| | **E** | | | | | [Express](./Express/) | | | | | [Express/Router](./Router) | | | -| **---** | **F** | | | +| | **F** | | | | | [File-System](./File-System/) | | | | | [Fastify](./Fastify/) | | | -| **---** | **G** | | | +| | **G** | | | | | [Grunt](./Grunt/) | | | -| **---** | **H** | | | -| **---** | **I** | | | -| **---** | **J** | | | +| | **H** | | | +| | **I** | | | +| | **J** | | | | | [Jsonwebtoken](./jsonwebtoken/) | | | -| **---** | **K** | | | -| **---** | **L** | | | +| | **K** | | | +| | **L** | | | | | [Lodash](./Lodash/) | | | -| **---** | **M** | | | +| | **M** | | | | | [Moment](./Moment/) | https://www.npmjs.com/package/moment | https://momentjs.com | | | [magic-string](./magic-string/) | | | | | [Mongoose](./mongoose/) | | | | | [Morgan](./morgan/) | | | -| **---** | **N** | | | +| | **N** | | | | | [NodeMailer](./nodeMailer) | | | -| **---** | **O** | | | +| | **O** | | | | | [ora](./ora) | | | -| **---** | **P** | | | +| | **P** | | | | | [Password-Validator](./password-validator) | | | | | [Prisma](./prisma/) | | | -| **---** | **Q** | | | -| **---** | **R** | | | +| | **Q** | | | +| | **R** | | | | | [Router](./Router/) | | | | | [RxJS](./RxJS/) | | | -| **---** | **S** | | | +| | **S** | | | | | [Socket](./Socket/) | | | -| **---** | **T** | | | +| | **T** | | | | | [TailWindCSS](./tailwindcss/) | | | | | [Toastify](./Toastify/) | | | -| **---** | **U** | | | +| | **U** | | | | | [Uid](./Uid/) | https://www.npmjs.com/package/uid | https://github.com/lukeed/uid | | | [URL](./URL/) | | | -| **---** | **V** | | | +| | **V** | | | | | [Validator](./Validator/) | | | -| **---** | **W** | | | -| **---** | **X** | | | -| **---** | **Y** | | | -| **---** | **Z** | | | +| | **W** | | | +| | **X** | | | +| | **Y** | | | +| | **Z** | | | @@ -126,7 +126,7 @@ cd npmBox **4.** Add a reference(remote) to the original repository. ``` -git remote add upstream https://github.com/R-Ayush777/npmBox.git +git remote add upstream https://github.com/R-Ayush777/npmBox ``` **5.** Check the remotes for this repository. @@ -148,10 +148,10 @@ git checkout -b ``` **8.** Perfom your desired changes to the code base. -___Note:___ Before making any modifications, be sure to install all essential packages with the `npm install` command. +___Note:___ Before making any modifications, be sure to install all essential packages with the `npm install ` command. ***If You adding new package*** - +- Navigate to npm_Modules <`cd npm_Modules`> for existing npm packages and to user_Modules <`cd user_Modules`> for user defined packages - Create new Folder with you package/module name `` - Add file with name of file package name `.js`. ___if it contains multiple file then main file should be name as above.___ - Adde README.md file which conatsins Add all neccessary information like functionalities, use-cases, code snippets etc. in the README.md file. @@ -175,7 +175,7 @@ git commit -m "" git push -u origin ``` -**12.** To create a pull request, click on `**compare and pull requests**`. +**12.** To create a pull request, click on `compare and pull requests`. **13.** Add appropriate title and description to your pull request explaining your changes and efforts done. diff --git a/Appwrite/CRUD Operation/Create.js b/npm_Modules/Appwrite/CRUD Operation/Create.js similarity index 100% rename from Appwrite/CRUD Operation/Create.js rename to npm_Modules/Appwrite/CRUD Operation/Create.js diff --git a/Appwrite/CRUD Operation/Delete.js b/npm_Modules/Appwrite/CRUD Operation/Delete.js similarity index 100% rename from Appwrite/CRUD Operation/Delete.js rename to npm_Modules/Appwrite/CRUD Operation/Delete.js diff --git a/Appwrite/CRUD Operation/Read.js b/npm_Modules/Appwrite/CRUD Operation/Read.js similarity index 100% rename from Appwrite/CRUD Operation/Read.js rename to npm_Modules/Appwrite/CRUD Operation/Read.js diff --git a/Appwrite/CRUD Operation/Update.js b/npm_Modules/Appwrite/CRUD Operation/Update.js similarity index 100% rename from Appwrite/CRUD Operation/Update.js rename to npm_Modules/Appwrite/CRUD Operation/Update.js diff --git a/Appwrite/CRUD Operation/config.js b/npm_Modules/Appwrite/CRUD Operation/config.js similarity index 100% rename from Appwrite/CRUD Operation/config.js rename to npm_Modules/Appwrite/CRUD Operation/config.js diff --git a/Appwrite/CRUD Operation/package-lock.json b/npm_Modules/Appwrite/CRUD Operation/package-lock.json similarity index 100% rename from Appwrite/CRUD Operation/package-lock.json rename to npm_Modules/Appwrite/CRUD Operation/package-lock.json diff --git a/Appwrite/CRUD Operation/package.json b/npm_Modules/Appwrite/CRUD Operation/package.json similarity index 100% rename from Appwrite/CRUD Operation/package.json rename to npm_Modules/Appwrite/CRUD Operation/package.json diff --git a/Appwrite/Function/appwrite.json b/npm_Modules/Appwrite/Function/appwrite.json similarity index 100% rename from Appwrite/Function/appwrite.json rename to npm_Modules/Appwrite/Function/appwrite.json diff --git a/Appwrite/Function/functions/Todo-Timer/.gitignore b/npm_Modules/Appwrite/Function/functions/Todo-Timer/.gitignore similarity index 100% rename from Appwrite/Function/functions/Todo-Timer/.gitignore rename to npm_Modules/Appwrite/Function/functions/Todo-Timer/.gitignore diff --git a/Appwrite/Function/functions/Todo-Timer/package-lock.json b/npm_Modules/Appwrite/Function/functions/Todo-Timer/package-lock.json similarity index 100% rename from Appwrite/Function/functions/Todo-Timer/package-lock.json rename to npm_Modules/Appwrite/Function/functions/Todo-Timer/package-lock.json diff --git a/Appwrite/Function/functions/Todo-Timer/package.json b/npm_Modules/Appwrite/Function/functions/Todo-Timer/package.json similarity index 100% rename from Appwrite/Function/functions/Todo-Timer/package.json rename to npm_Modules/Appwrite/Function/functions/Todo-Timer/package.json diff --git a/Appwrite/Function/functions/Todo-Timer/src/index.js b/npm_Modules/Appwrite/Function/functions/Todo-Timer/src/index.js similarity index 100% rename from Appwrite/Function/functions/Todo-Timer/src/index.js rename to npm_Modules/Appwrite/Function/functions/Todo-Timer/src/index.js diff --git a/Appwrite/README.md b/npm_Modules/Appwrite/README.md similarity index 100% rename from Appwrite/README.md rename to npm_Modules/Appwrite/README.md diff --git a/Async/Async.js b/npm_Modules/Async/Async.js similarity index 100% rename from Async/Async.js rename to npm_Modules/Async/Async.js diff --git a/Async/README.md b/npm_Modules/Async/README.md similarity index 100% rename from Async/README.md rename to npm_Modules/Async/README.md diff --git a/Bcrypt/Bcrypt.js b/npm_Modules/Bcrypt/Bcrypt.js similarity index 100% rename from Bcrypt/Bcrypt.js rename to npm_Modules/Bcrypt/Bcrypt.js diff --git a/Bcrypt/README.MD b/npm_Modules/Bcrypt/README.MD similarity index 100% rename from Bcrypt/README.MD rename to npm_Modules/Bcrypt/README.MD diff --git a/Cloudinary/Cloudinary.js b/npm_Modules/Cloudinary/Cloudinary.js similarity index 100% rename from Cloudinary/Cloudinary.js rename to npm_Modules/Cloudinary/Cloudinary.js diff --git a/Cloudinary/README.md b/npm_Modules/Cloudinary/README.md similarity index 100% rename from Cloudinary/README.md rename to npm_Modules/Cloudinary/README.md diff --git a/Express/README.md b/npm_Modules/Express/README.md similarity index 100% rename from Express/README.md rename to npm_Modules/Express/README.md diff --git a/Express/express.js b/npm_Modules/Express/express.js similarity index 100% rename from Express/express.js rename to npm_Modules/Express/express.js diff --git a/Express/index.html b/npm_Modules/Express/index.html similarity index 100% rename from Express/index.html rename to npm_Modules/Express/index.html diff --git a/Fastify/README.md b/npm_Modules/Fastify/README.md similarity index 98% rename from Fastify/README.md rename to npm_Modules/Fastify/README.md index 6cb796b..9773c9c 100644 --- a/Fastify/README.md +++ b/npm_Modules/Fastify/README.md @@ -1,17 +1,17 @@ -# Fastify - -## What is Fastify ? -Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. - -## Install: -To install Fastify in an existing project as a dependency install with npm: -``` - npm i fastify -``` - -## Feature of Fastify: -* Highly performant: as far as we know, Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 76+ thousand requests per second. -* Extendible: Fastify is fully extensible via its hooks, plugins and decorators. -* Schema based: even if it is not mandatory we recommend to use JSON Schema to validate your routes and serialize your outputs, internally Fastify compiles the schema in a highly performant function. -* Logging: logs are extremely important but are costly; we chose the best logger to almost remove this cost, Pino! +# Fastify + +## What is Fastify ? +Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. + +## Install: +To install Fastify in an existing project as a dependency install with npm: +``` + npm i fastify +``` + +## Feature of Fastify: +* Highly performant: as far as we know, Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 76+ thousand requests per second. +* Extendible: Fastify is fully extensible via its hooks, plugins and decorators. +* Schema based: even if it is not mandatory we recommend to use JSON Schema to validate your routes and serialize your outputs, internally Fastify compiles the schema in a highly performant function. +* Logging: logs are extremely important but are costly; we chose the best logger to almost remove this cost, Pino! * Developer friendly: the framework is built to be very expressive and help the developer in their daily use, without sacrificing performance and security. \ No newline at end of file diff --git a/Fastify/fastify.js b/npm_Modules/Fastify/fastify.js similarity index 95% rename from Fastify/fastify.js rename to npm_Modules/Fastify/fastify.js index bdcdcba..8a9b2ea 100644 --- a/Fastify/fastify.js +++ b/npm_Modules/Fastify/fastify.js @@ -1,19 +1,19 @@ -// ESM -import Fastify from 'fastify' -const fastify = Fastify({ - logger: true -}) -// CommonJs -const fastify = require('fastify')({ - logger: true -}) - -fastify.get('/', async (request, reply) => { - reply.type('application/json').code(200) - return { hello: 'world' } -}) - -fastify.listen({ port: 3000 }, (err, address) => { - if (err) throw err - // Server is now listening on ${address} +// ESM +import Fastify from 'fastify' +const fastify = Fastify({ + logger: true +}) +// CommonJs +const fastify = require('fastify')({ + logger: true +}) + +fastify.get('/', async (request, reply) => { + reply.type('application/json').code(200) + return { hello: 'world' } +}) + +fastify.listen({ port: 3000 }, (err, address) => { + if (err) throw err + // Server is now listening on ${address} }) \ No newline at end of file diff --git a/File-System/File_System.js b/npm_Modules/File-System/File_System.js similarity index 100% rename from File-System/File_System.js rename to npm_Modules/File-System/File_System.js diff --git a/File-System/README.md b/npm_Modules/File-System/README.md similarity index 100% rename from File-System/README.md rename to npm_Modules/File-System/README.md diff --git a/Grunt/Gruntfile b/npm_Modules/Grunt/Gruntfile similarity index 100% rename from Grunt/Gruntfile rename to npm_Modules/Grunt/Gruntfile diff --git a/Grunt/README.md b/npm_Modules/Grunt/README.md similarity index 100% rename from Grunt/README.md rename to npm_Modules/Grunt/README.md diff --git a/Grunt/package.json b/npm_Modules/Grunt/package.json similarity index 100% rename from Grunt/package.json rename to npm_Modules/Grunt/package.json diff --git a/Lodash/README.md b/npm_Modules/Lodash/README.md similarity index 100% rename from Lodash/README.md rename to npm_Modules/Lodash/README.md diff --git a/Lodash/core.js b/npm_Modules/Lodash/core.js similarity index 100% rename from Lodash/core.js rename to npm_Modules/Lodash/core.js diff --git a/Moment/README.md b/npm_Modules/Moment/README.md similarity index 100% rename from Moment/README.md rename to npm_Modules/Moment/README.md diff --git a/Moment/moment.js b/npm_Modules/Moment/moment.js similarity index 100% rename from Moment/moment.js rename to npm_Modules/Moment/moment.js diff --git a/Ramda/README.md b/npm_Modules/Ramda/README.md similarity index 100% rename from Ramda/README.md rename to npm_Modules/Ramda/README.md diff --git a/Ramda/ramda.js b/npm_Modules/Ramda/ramda.js similarity index 100% rename from Ramda/ramda.js rename to npm_Modules/Ramda/ramda.js diff --git a/Router/README.MD b/npm_Modules/Router/README.MD similarity index 100% rename from Router/README.MD rename to npm_Modules/Router/README.MD diff --git a/Router/Router.js b/npm_Modules/Router/Router.js similarity index 100% rename from Router/Router.js rename to npm_Modules/Router/Router.js diff --git a/Router/router1.js b/npm_Modules/Router/router1.js similarity index 100% rename from Router/router1.js rename to npm_Modules/Router/router1.js diff --git a/RxJS/README.md b/npm_Modules/RxJS/README.md similarity index 100% rename from RxJS/README.md rename to npm_Modules/RxJS/README.md diff --git a/RxJS/rxjs.js b/npm_Modules/RxJS/rxjs.js similarity index 100% rename from RxJS/rxjs.js rename to npm_Modules/RxJS/rxjs.js diff --git a/String/README.md b/npm_Modules/String/README.md similarity index 100% rename from String/README.md rename to npm_Modules/String/README.md diff --git a/String/string.js b/npm_Modules/String/string.js similarity index 100% rename from String/string.js rename to npm_Modules/String/string.js diff --git a/Toastify/README.md b/npm_Modules/Toastify/README.md similarity index 100% rename from Toastify/README.md rename to npm_Modules/Toastify/README.md diff --git a/Toastify/screenshots/1.png b/npm_Modules/Toastify/screenshots/1.png similarity index 100% rename from Toastify/screenshots/1.png rename to npm_Modules/Toastify/screenshots/1.png diff --git a/Toastify/screenshots/2.png b/npm_Modules/Toastify/screenshots/2.png similarity index 100% rename from Toastify/screenshots/2.png rename to npm_Modules/Toastify/screenshots/2.png diff --git a/Toastify/screenshots/3.png b/npm_Modules/Toastify/screenshots/3.png similarity index 100% rename from Toastify/screenshots/3.png rename to npm_Modules/Toastify/screenshots/3.png diff --git a/Toastify/screenshots/4.png b/npm_Modules/Toastify/screenshots/4.png similarity index 100% rename from Toastify/screenshots/4.png rename to npm_Modules/Toastify/screenshots/4.png diff --git a/Toastify/toastify/.gitignore b/npm_Modules/Toastify/toastify/.gitignore similarity index 100% rename from Toastify/toastify/.gitignore rename to npm_Modules/Toastify/toastify/.gitignore diff --git a/Toastify/toastify/README.md b/npm_Modules/Toastify/toastify/README.md similarity index 100% rename from Toastify/toastify/README.md rename to npm_Modules/Toastify/toastify/README.md diff --git a/Toastify/toastify/package-lock.json b/npm_Modules/Toastify/toastify/package-lock.json similarity index 100% rename from Toastify/toastify/package-lock.json rename to npm_Modules/Toastify/toastify/package-lock.json diff --git a/Toastify/toastify/package.json b/npm_Modules/Toastify/toastify/package.json similarity index 100% rename from Toastify/toastify/package.json rename to npm_Modules/Toastify/toastify/package.json diff --git a/Toastify/toastify/public/favicon.ico b/npm_Modules/Toastify/toastify/public/favicon.ico similarity index 100% rename from Toastify/toastify/public/favicon.ico rename to npm_Modules/Toastify/toastify/public/favicon.ico diff --git a/Toastify/toastify/public/index.html b/npm_Modules/Toastify/toastify/public/index.html similarity index 100% rename from Toastify/toastify/public/index.html rename to npm_Modules/Toastify/toastify/public/index.html diff --git a/Toastify/toastify/public/logo192.png b/npm_Modules/Toastify/toastify/public/logo192.png similarity index 100% rename from Toastify/toastify/public/logo192.png rename to npm_Modules/Toastify/toastify/public/logo192.png diff --git a/Toastify/toastify/public/logo512.png b/npm_Modules/Toastify/toastify/public/logo512.png similarity index 100% rename from Toastify/toastify/public/logo512.png rename to npm_Modules/Toastify/toastify/public/logo512.png diff --git a/Toastify/toastify/public/manifest.json b/npm_Modules/Toastify/toastify/public/manifest.json similarity index 100% rename from Toastify/toastify/public/manifest.json rename to npm_Modules/Toastify/toastify/public/manifest.json diff --git a/Toastify/toastify/public/robots.txt b/npm_Modules/Toastify/toastify/public/robots.txt similarity index 100% rename from Toastify/toastify/public/robots.txt rename to npm_Modules/Toastify/toastify/public/robots.txt diff --git a/Toastify/toastify/src/App.css b/npm_Modules/Toastify/toastify/src/App.css similarity index 100% rename from Toastify/toastify/src/App.css rename to npm_Modules/Toastify/toastify/src/App.css diff --git a/Toastify/toastify/src/App.js b/npm_Modules/Toastify/toastify/src/App.js similarity index 100% rename from Toastify/toastify/src/App.js rename to npm_Modules/Toastify/toastify/src/App.js diff --git a/Toastify/toastify/src/App.test.js b/npm_Modules/Toastify/toastify/src/App.test.js similarity index 100% rename from Toastify/toastify/src/App.test.js rename to npm_Modules/Toastify/toastify/src/App.test.js diff --git a/Toastify/toastify/src/Components/Login.jsx b/npm_Modules/Toastify/toastify/src/Components/Login.jsx similarity index 100% rename from Toastify/toastify/src/Components/Login.jsx rename to npm_Modules/Toastify/toastify/src/Components/Login.jsx diff --git a/Toastify/toastify/src/index.css b/npm_Modules/Toastify/toastify/src/index.css similarity index 100% rename from Toastify/toastify/src/index.css rename to npm_Modules/Toastify/toastify/src/index.css diff --git a/Toastify/toastify/src/index.js b/npm_Modules/Toastify/toastify/src/index.js similarity index 100% rename from Toastify/toastify/src/index.js rename to npm_Modules/Toastify/toastify/src/index.js diff --git a/Toastify/toastify/src/reportWebVitals.js b/npm_Modules/Toastify/toastify/src/reportWebVitals.js similarity index 100% rename from Toastify/toastify/src/reportWebVitals.js rename to npm_Modules/Toastify/toastify/src/reportWebVitals.js diff --git a/Toastify/toastify/src/setupTests.js b/npm_Modules/Toastify/toastify/src/setupTests.js similarity index 100% rename from Toastify/toastify/src/setupTests.js rename to npm_Modules/Toastify/toastify/src/setupTests.js diff --git a/Toastify/toastify/tailwind.config.js b/npm_Modules/Toastify/toastify/tailwind.config.js similarity index 100% rename from Toastify/toastify/tailwind.config.js rename to npm_Modules/Toastify/toastify/tailwind.config.js diff --git a/URL/README.md b/npm_Modules/URL/README.md similarity index 100% rename from URL/README.md rename to npm_Modules/URL/README.md diff --git a/URL/url.js b/npm_Modules/URL/url.js similarity index 100% rename from URL/url.js rename to npm_Modules/URL/url.js diff --git a/Uid/README.md b/npm_Modules/Uid/README.md similarity index 100% rename from Uid/README.md rename to npm_Modules/Uid/README.md diff --git a/Uid/uid.js b/npm_Modules/Uid/uid.js similarity index 100% rename from Uid/uid.js rename to npm_Modules/Uid/uid.js diff --git a/Underscore/README.md b/npm_Modules/Underscore/README.md similarity index 97% rename from Underscore/README.md rename to npm_Modules/Underscore/README.md index b31b014..e05fae8 100644 --- a/Underscore/README.md +++ b/npm_Modules/Underscore/README.md @@ -1,10 +1,10 @@ -# Underscore - -## What is Underscore ? -Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter, etc.) without extending any core JavaScript objects. - -## Install: -To install Underscore in an existing project as a dependency install with npm: -``` - npm i underscore +# Underscore + +## What is Underscore ? +Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter, etc.) without extending any core JavaScript objects. + +## Install: +To install Underscore in an existing project as a dependency install with npm: +``` + npm i underscore ``` \ No newline at end of file diff --git a/Underscore/underscore.js b/npm_Modules/Underscore/underscore.js similarity index 97% rename from Underscore/underscore.js rename to npm_Modules/Underscore/underscore.js index 66b9999..7d47d73 100644 --- a/Underscore/underscore.js +++ b/npm_Modules/Underscore/underscore.js @@ -1,4 +1,4 @@ -const _ = require("underscore"); -const list = [[5, 1, 7], [3, 2, 1]]; -_.invoke(list, 'sort'); +const _ = require("underscore"); +const list = [[5, 1, 7], [3, 2, 1]]; +_.invoke(list, 'sort'); // => [[1, 5, 7], [1, 2, 3]] \ No newline at end of file diff --git a/Validator/README.md b/npm_Modules/Validator/README.md similarity index 100% rename from Validator/README.md rename to npm_Modules/Validator/README.md diff --git a/Validator/validator.js b/npm_Modules/Validator/validator.js similarity index 100% rename from Validator/validator.js rename to npm_Modules/Validator/validator.js diff --git a/Wide-align/README.md b/npm_Modules/Wide-align/README.md similarity index 100% rename from Wide-align/README.md rename to npm_Modules/Wide-align/README.md diff --git a/Wide-align/wideAlign.js b/npm_Modules/Wide-align/wideAlign.js similarity index 100% rename from Wide-align/wideAlign.js rename to npm_Modules/Wide-align/wideAlign.js diff --git a/axios/README.md b/npm_Modules/axios/README.md similarity index 100% rename from axios/README.md rename to npm_Modules/axios/README.md diff --git a/axios/axios.js b/npm_Modules/axios/axios.js similarity index 100% rename from axios/axios.js rename to npm_Modules/axios/axios.js diff --git a/browserify/README.md b/npm_Modules/browserify/README.md similarity index 100% rename from browserify/README.md rename to npm_Modules/browserify/README.md diff --git a/browserify/main.js b/npm_Modules/browserify/main.js similarity index 100% rename from browserify/main.js rename to npm_Modules/browserify/main.js diff --git a/chalk/README.md b/npm_Modules/chalk/README.md similarity index 100% rename from chalk/README.md rename to npm_Modules/chalk/README.md diff --git a/chalk/chalk.js b/npm_Modules/chalk/chalk.js similarity index 100% rename from chalk/chalk.js rename to npm_Modules/chalk/chalk.js diff --git a/commander/Commander.js b/npm_Modules/commander/Commander.js similarity index 100% rename from commander/Commander.js rename to npm_Modules/commander/Commander.js diff --git a/commander/README.md b/npm_Modules/commander/README.md similarity index 100% rename from commander/README.md rename to npm_Modules/commander/README.md diff --git a/debug/debug.js b/npm_Modules/debug/debug.js similarity index 100% rename from debug/debug.js rename to npm_Modules/debug/debug.js diff --git a/jsonwebtoken/README.md b/npm_Modules/jsonwebtoken/README.md similarity index 100% rename from jsonwebtoken/README.md rename to npm_Modules/jsonwebtoken/README.md diff --git a/jsonwebtoken/jsonwebtoken.js b/npm_Modules/jsonwebtoken/jsonwebtoken.js similarity index 100% rename from jsonwebtoken/jsonwebtoken.js rename to npm_Modules/jsonwebtoken/jsonwebtoken.js diff --git a/magic-string/README.MD b/npm_Modules/magic-string/README.MD similarity index 100% rename from magic-string/README.MD rename to npm_Modules/magic-string/README.MD diff --git a/magic-string/converted.js b/npm_Modules/magic-string/converted.js similarity index 100% rename from magic-string/converted.js rename to npm_Modules/magic-string/converted.js diff --git a/magic-string/converted.js.map b/npm_Modules/magic-string/converted.js.map similarity index 100% rename from magic-string/converted.js.map rename to npm_Modules/magic-string/converted.js.map diff --git a/magic-string/magic-string.js b/npm_Modules/magic-string/magic-string.js similarity index 100% rename from magic-string/magic-string.js rename to npm_Modules/magic-string/magic-string.js diff --git a/mongoose/README.md b/npm_Modules/mongoose/README.md similarity index 100% rename from mongoose/README.md rename to npm_Modules/mongoose/README.md diff --git a/mongoose/auth.js b/npm_Modules/mongoose/auth.js similarity index 96% rename from mongoose/auth.js rename to npm_Modules/mongoose/auth.js index 95d3535..fc09efc 100644 --- a/mongoose/auth.js +++ b/npm_Modules/mongoose/auth.js @@ -1,32 +1,32 @@ -const express = require("express"); -const User = require("./model"); -const bcryptjs = require("bcryptjs"); -const authRouter = express.Router(); - -// SIGN UP -authRouter.post("/api/signup", async (req, res) => { - try { - const { name, email, password } = req.body; - - const existingUser = await User.findOne({ email }); - if (existingUser) { - return res - .status(400) - .json({ msg: "User with same email already exists!" }); - } - - const hashedPassword = await bcryptjs.hash(password, 8); - - let user = new User({ - email, - password: hashedPassword, - name, - }); - user = await user.save(); - res.json(user); - } catch (e) { - res.status(500).json({ error: e.message }); - } -}); - +const express = require("express"); +const User = require("./model"); +const bcryptjs = require("bcryptjs"); +const authRouter = express.Router(); + +// SIGN UP +authRouter.post("/api/signup", async (req, res) => { + try { + const { name, email, password } = req.body; + + const existingUser = await User.findOne({ email }); + if (existingUser) { + return res + .status(400) + .json({ msg: "User with same email already exists!" }); + } + + const hashedPassword = await bcryptjs.hash(password, 8); + + let user = new User({ + email, + password: hashedPassword, + name, + }); + user = await user.save(); + res.json(user); + } catch (e) { + res.status(500).json({ error: e.message }); + } +}); + module.exports = authRouter; \ No newline at end of file diff --git a/mongoose/model.js b/npm_Modules/mongoose/model.js similarity index 95% rename from mongoose/model.js rename to npm_Modules/mongoose/model.js index 132d479..2a2601d 100644 --- a/mongoose/model.js +++ b/npm_Modules/mongoose/model.js @@ -1,34 +1,34 @@ -const mongoose = require("mongoose"); - -const userSchema = mongoose.Schema({ - name: { - required: true, - type: String, - trim: true, - }, - email: { - required: true, - type: String, - trim: true, - validate: { - validator: (value) => { - const re = - /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; - return value.match(re); - }, - message: "Please enter a valid email address", - }, - }, - password: { - required: true, - type: String, - }, - type: { - type: String, - default: "user", - }, - -}); - -const User = mongoose.model("User", userSchema); +const mongoose = require("mongoose"); + +const userSchema = mongoose.Schema({ + name: { + required: true, + type: String, + trim: true, + }, + email: { + required: true, + type: String, + trim: true, + validate: { + validator: (value) => { + const re = + /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i; + return value.match(re); + }, + message: "Please enter a valid email address", + }, + }, + password: { + required: true, + type: String, + }, + type: { + type: String, + default: "user", + }, + +}); + +const User = mongoose.model("User", userSchema); module.exports = User; \ No newline at end of file diff --git a/mongoose/mongoose.js b/npm_Modules/mongoose/mongoose.js similarity index 100% rename from mongoose/mongoose.js rename to npm_Modules/mongoose/mongoose.js diff --git a/morgan/README.md b/npm_Modules/morgan/README.md similarity index 100% rename from morgan/README.md rename to npm_Modules/morgan/README.md diff --git a/morgan/app.js b/npm_Modules/morgan/app.js similarity index 100% rename from morgan/app.js rename to npm_Modules/morgan/app.js diff --git a/morgan/index.html b/npm_Modules/morgan/index.html similarity index 100% rename from morgan/index.html rename to npm_Modules/morgan/index.html diff --git a/nodeMailer/README.md b/npm_Modules/nodeMailer/README.md similarity index 100% rename from nodeMailer/README.md rename to npm_Modules/nodeMailer/README.md diff --git a/nodeMailer/nodeMailer.js b/npm_Modules/nodeMailer/nodeMailer.js similarity index 100% rename from nodeMailer/nodeMailer.js rename to npm_Modules/nodeMailer/nodeMailer.js diff --git a/ora/README.md b/npm_Modules/ora/README.md similarity index 94% rename from ora/README.md rename to npm_Modules/ora/README.md index 7ff2dd2..f100e34 100644 --- a/ora/README.md +++ b/npm_Modules/ora/README.md @@ -1,36 +1,36 @@ -# ora - -## What is ora -Ora is simple loading spinner in npm. When you want to communicate to the user that she needs to wait you can use ora. - -## Installation -We can install ora package by using below command. -
 npm install ora 
- -## API -- ora(text) -- ora(options)
- options - - text - - prefixText - - spinner - - color - - hideCursor - - indent - - interval - - stream - - isEnabled - - isSilent - - discardStdin - - ## Usage -
- const ora = require('ora-classic');
-
-const spinner = ora('Loading unicorns').start();
-
-setTimeout(() => {
-	spinner.color = 'yellow';
-	spinner.text = 'Loading rainbows';
-}, 1000);
-
+# ora + +## What is ora +Ora is simple loading spinner in npm. When you want to communicate to the user that she needs to wait you can use ora. + +## Installation +We can install ora package by using below command. +
 npm install ora 
+ +## API +- ora(text) +- ora(options)
+ options + - text + - prefixText + - spinner + - color + - hideCursor + - indent + - interval + - stream + - isEnabled + - isSilent + - discardStdin + + ## Usage +
+ const ora = require('ora-classic');
+
+const spinner = ora('Loading unicorns').start();
+
+setTimeout(() => {
+	spinner.color = 'yellow';
+	spinner.text = 'Loading rainbows';
+}, 1000);
+
diff --git a/ora/ora.js b/npm_Modules/ora/ora.js similarity index 100% rename from ora/ora.js rename to npm_Modules/ora/ora.js diff --git a/password-validator/README.md b/npm_Modules/password-validator/README.md similarity index 100% rename from password-validator/README.md rename to npm_Modules/password-validator/README.md diff --git a/password-validator/password-validator.js b/npm_Modules/password-validator/password-validator.js similarity index 100% rename from password-validator/password-validator.js rename to npm_Modules/password-validator/password-validator.js diff --git a/prisma/README.md b/npm_Modules/prisma/README.md similarity index 100% rename from prisma/README.md rename to npm_Modules/prisma/README.md diff --git a/prisma/authentication_example_using_prisma/.env b/npm_Modules/prisma/authentication_example_using_prisma/.env similarity index 100% rename from prisma/authentication_example_using_prisma/.env rename to npm_Modules/prisma/authentication_example_using_prisma/.env diff --git a/prisma/authentication_example_using_prisma/controllers/postControllers.js b/npm_Modules/prisma/authentication_example_using_prisma/controllers/postControllers.js similarity index 100% rename from prisma/authentication_example_using_prisma/controllers/postControllers.js rename to npm_Modules/prisma/authentication_example_using_prisma/controllers/postControllers.js diff --git a/prisma/authentication_example_using_prisma/controllers/userController.js b/npm_Modules/prisma/authentication_example_using_prisma/controllers/userController.js similarity index 100% rename from prisma/authentication_example_using_prisma/controllers/userController.js rename to npm_Modules/prisma/authentication_example_using_prisma/controllers/userController.js diff --git a/prisma/authentication_example_using_prisma/helpers/getJwtToken.js b/npm_Modules/prisma/authentication_example_using_prisma/helpers/getJwtToken.js similarity index 100% rename from prisma/authentication_example_using_prisma/helpers/getJwtToken.js rename to npm_Modules/prisma/authentication_example_using_prisma/helpers/getJwtToken.js diff --git a/prisma/authentication_example_using_prisma/index.js b/npm_Modules/prisma/authentication_example_using_prisma/index.js similarity index 100% rename from prisma/authentication_example_using_prisma/index.js rename to npm_Modules/prisma/authentication_example_using_prisma/index.js diff --git a/prisma/authentication_example_using_prisma/middlewares/isLoggedIn.js b/npm_Modules/prisma/authentication_example_using_prisma/middlewares/isLoggedIn.js similarity index 100% rename from prisma/authentication_example_using_prisma/middlewares/isLoggedIn.js rename to npm_Modules/prisma/authentication_example_using_prisma/middlewares/isLoggedIn.js diff --git a/prisma/authentication_example_using_prisma/package-lock.json b/npm_Modules/prisma/authentication_example_using_prisma/package-lock.json similarity index 100% rename from prisma/authentication_example_using_prisma/package-lock.json rename to npm_Modules/prisma/authentication_example_using_prisma/package-lock.json diff --git a/prisma/authentication_example_using_prisma/package.json b/npm_Modules/prisma/authentication_example_using_prisma/package.json similarity index 100% rename from prisma/authentication_example_using_prisma/package.json rename to npm_Modules/prisma/authentication_example_using_prisma/package.json diff --git a/prisma/authentication_example_using_prisma/prisma/index.js b/npm_Modules/prisma/authentication_example_using_prisma/prisma/index.js similarity index 100% rename from prisma/authentication_example_using_prisma/prisma/index.js rename to npm_Modules/prisma/authentication_example_using_prisma/prisma/index.js diff --git a/prisma/authentication_example_using_prisma/prisma/schema.prisma b/npm_Modules/prisma/authentication_example_using_prisma/prisma/schema.prisma similarity index 100% rename from prisma/authentication_example_using_prisma/prisma/schema.prisma rename to npm_Modules/prisma/authentication_example_using_prisma/prisma/schema.prisma diff --git a/prisma/authentication_example_using_prisma/routes/postRoutes.js b/npm_Modules/prisma/authentication_example_using_prisma/routes/postRoutes.js similarity index 100% rename from prisma/authentication_example_using_prisma/routes/postRoutes.js rename to npm_Modules/prisma/authentication_example_using_prisma/routes/postRoutes.js diff --git a/prisma/authentication_example_using_prisma/routes/userRoutes.js b/npm_Modules/prisma/authentication_example_using_prisma/routes/userRoutes.js similarity index 100% rename from prisma/authentication_example_using_prisma/routes/userRoutes.js rename to npm_Modules/prisma/authentication_example_using_prisma/routes/userRoutes.js diff --git a/prisma/authentication_example_using_prisma/utils/cookieToken.js b/npm_Modules/prisma/authentication_example_using_prisma/utils/cookieToken.js similarity index 100% rename from prisma/authentication_example_using_prisma/utils/cookieToken.js rename to npm_Modules/prisma/authentication_example_using_prisma/utils/cookieToken.js diff --git a/prisma/index.js b/npm_Modules/prisma/index.js similarity index 100% rename from prisma/index.js rename to npm_Modules/prisma/index.js diff --git a/prisma/schema.prisma b/npm_Modules/prisma/schema.prisma similarity index 100% rename from prisma/schema.prisma rename to npm_Modules/prisma/schema.prisma diff --git a/socket/socket.io.js b/npm_Modules/socket/socket.io.js similarity index 100% rename from socket/socket.io.js rename to npm_Modules/socket/socket.io.js diff --git a/tailwindcss/README.md b/npm_Modules/tailwindcss/README.md similarity index 100% rename from tailwindcss/README.md rename to npm_Modules/tailwindcss/README.md diff --git a/tailwindcss/dist/style.css b/npm_Modules/tailwindcss/dist/style.css similarity index 100% rename from tailwindcss/dist/style.css rename to npm_Modules/tailwindcss/dist/style.css diff --git a/tailwindcss/package-lock.json b/npm_Modules/tailwindcss/package-lock.json similarity index 100% rename from tailwindcss/package-lock.json rename to npm_Modules/tailwindcss/package-lock.json diff --git a/tailwindcss/package.json b/npm_Modules/tailwindcss/package.json similarity index 100% rename from tailwindcss/package.json rename to npm_Modules/tailwindcss/package.json diff --git a/tailwindcss/screenshot/result.png b/npm_Modules/tailwindcss/screenshot/result.png similarity index 100% rename from tailwindcss/screenshot/result.png rename to npm_Modules/tailwindcss/screenshot/result.png diff --git a/tailwindcss/src/index.html b/npm_Modules/tailwindcss/src/index.html similarity index 100% rename from tailwindcss/src/index.html rename to npm_Modules/tailwindcss/src/index.html diff --git a/tailwindcss/src/style.css b/npm_Modules/tailwindcss/src/style.css similarity index 100% rename from tailwindcss/src/style.css rename to npm_Modules/tailwindcss/src/style.css diff --git a/tailwindcss/tailwind.config.js b/npm_Modules/tailwindcss/tailwind.config.js similarity index 100% rename from tailwindcss/tailwind.config.js rename to npm_Modules/tailwindcss/tailwind.config.js