1.0.4 • Published 2 years ago

laptops v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

laptops

laptops is a lightweight zero-dependency npm package that can be used to get the list of laptop brands and models

NPM

npm version

Installation

npm install laptops

Example

//ES5
const laptops = require('laptops');

// ES6
import laptops from 'laptops';

console.log(laptops.getAll());
// Get all arguments (args) from getBrand('all')
console.log(laptops.getBrand('all')); 
console.log(laptops.getBrand("popular"))
console.log(laptops.getBrand("Hp"))
console.log(laptops.getModel("Asus"))
console.log(laptops.getSeries("Apple"))

Demo

Link to the github repository

Demo

functionargumentresponse
.getAll()nonebrand names, series and models.These are also args for getbrand(),getModel & getSeries
.getBrand(args)args(all,popular,hp,dell...)Response is an object with brand name, an array of models and series passed
.getModel(args)args(all,popular,hp,dell,Asus...)Response is an array of models that belong to a brand
.getSeries(args)args(all ....)Response is an array of series that belong to a brand

Contributing

This module tries to be exhaustive, if there are still laptops brands, models or series that havent been added,plese contribute to the project

  • Fork this repositry to your account.
  • Clone your repositry: git clone git@github.com:your-username/laptops.git
  • Create your feature branch: git checkout -b"short feature description"
  • Commit your changes: git commit -m "feature"
  • Push to the remote branch: git push origin new-feature
  • Open a pull request.

License

This project is authored by Bolaji Olayinka and is licensed for your use, modification and distribution under the MIT license.