Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @mars/the-noun-project with all npm packages installed. Try it out:

var theNounProject = require("@mars/the-noun-project")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@mars/the-noun-project v2.1.0

Node.js wrapper for The Noun Project's API

The Noun Project

npm Module

Node.js wrapper for The Noun Project's API

Installation

Simply add to your project with

npm install --save @mars/the-noun-project

In your project file:

var NounProject = require('@mars/the-noun-project'),
nounProject = new NounProject({
    key: 'foo',
    secret: 'bar'
});

You can get your keys from The Noun Project developer's page.

Usage

See The Noun Project API Explorer for more information on the endpoints available.

The query string options object is optional and can be omitted. See the tests for more information.

nounProject.getIconsByTerm('goat', {limit: 5}, function (err, data) {
    if (!err) {
        console.log(data.icons);
    }
});

or

nounProject.getIconsByTerm('goat', function (err, data) {
    if (!err) {
        console.log(data.icons);
    }
});
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free