This provide various number of electrical parts modules.
First, Install this module.
npm install obniz-parts
and load this in your js file.
var Parts = require('obniz-parts');
then you can create object contained in this library. all parts list is available here
var Parts = require('obniz-parts');
var myled = new Parts.LED();
see the connection to an obniz at here.