Skip to content

BolajiOlayinka/laptops

Repository files navigation

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

function argument response
.getAll() none brand 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,please contribute to the project

  • Fork this repository to your account.
  • Clone your repository: 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published