Given an id or part number sparkfun-lookup returns the product.
Very simple library to get a product's data from sparkfun given an ID or part number.
var lookup = require'sparkfun-lookup'lookupid: 97 part: 'COM-00097'if errconsole.errorerrreturnconsole.log'%s: %s' productsku productname
You only need
part, if both are provided, it makes sure they reference the same part.
If you provide
part it will check
product.sku against it to make sure that it is actually the one you meant.