
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
Load and use plugins to manipulate objects. Load locally defined plugins, or define a namespace to automatically load plugins from node_modules. Easy to use and extend.
Load and use plugins to manipulate objects. Load locally defined plugins, or define a namespace to automatically load plugins from node_modules. Easy to use and extend.
Noun makes it easy to extend your application with basic plugin functionality.
var Noun = require('noun');
By default, plugins named noun-* are automatically loaded from node_modules.
Pass a namespace to use your own naming convention:
// load plugins named `my-app-*`
var noun = new Noun('my-app');
Note that plugins are only loaded if they are listed in dependencies or devDependencies in package.json.
See the examples and tests for a better understanding of how Noun works.
For local plugins, simply use a leading dot ./ in the path, just like require() rules:
noun.loadPlugins('./plugins/*.js');
npm i noun --save
npm test
Create an instance of Noun with the given namespace.
namespace {Object}: Used to automatically load plugins from node_modules.source {Object}: Pass an object to directly extend the this object.var Noun = require('noun');
var noun = new Noun('foo');
Define a plugin.
fn {Function}: The function to call.returns {Object}: Returns Noun for chaining.noun
.plugin(foo())
.plugin(bar())
.plugin(baz())
Load plugins.
pattern {String}: Optionally pass a glob pattern when calling the method directly.returns {Object}: Returns an object of plugins loaded from node_modules.Called in the constructor to load plugins from node_modules
using the given namespace, but you may also call the method
directly.
For example, the namespace foo would load plugins using the
foo-* glob pattern, e.g:
noun.loadPlugins('foo-*');
Run an object of plugins. By default, the .runPlugins() method is called in the constructor, but it may also be used directly.
fns {Object}: Object of plugins.When used directly, each plugin is a key-value pair, where the key is the plugin name, and the value is the function to be called.
Currently, the plugin name is useless, so this could have been setup to take an array. However, there are plans to add additional features to take advantage of this configuration.
Example:
noun.runPlugins({'myPlugin': [function]});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on October 27, 2014.
FAQs
Load and use plugins to manipulate objects. Load locally defined plugins, or define a namespace to automatically load plugins from node_modules. Easy to use and extend.
We found that noun demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.