UNPKG
swapi-node
Version:
latest (0.7.0)
0.7.0
0.6.0
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.4.0-dev
0.3.0
0.2.1
0.2.0
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
A Node.js helper library for SWAPI
github.com/salty-pig/swapi-node
salty-pig/swapi-node
swapi-node
/
example.js
11 lines
(7 loc)
•
158 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
;
const
swapi =
require
(
'swapi-node'
); swapi.
getPerson
().
then
(
result
=>
{
console
.
log
(result); }).
catch
(
error
=>
{
console
.
log
(error); });