laptops

1.0.4 • Public • Published

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,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.

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i laptops

    Weekly Downloads

    6

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    89.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • bolaji-olayinka