![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@flexshopper/hapi-methods
Advanced tools
Plugin to autoload methods based on patterns.
hapi-methods
npm package in your project our plugin.
npm i @flexshopper/hapi-methods
const server = new Hapi.Server();
server.connection();
server.register({
register: require('hapi-methods'),
options: {
relativeTo: proccess.cwd() + '/methods',
includes: ['path/to/**/*methods.js'],
ignore: ['*.git'],
}
}, (err) => {
// continue application
});
manifest style:
registrations: [
...
{
plugin: {
register: 'hapi-methods',
options: {
relativeTo: proccess.cwd() + '/methods',
includes: ['path/to/**/*methods.js'],
ignore: ['*.git'],
}
}
}
];
Required
Type: array
The glob pattern you would like to include
Type: array
The pattern or an array of patterns to exclude
Type: string
The current working directory in which to search (defaults to process.cwd()
)
'use strict';
const internals = module.exports = {};
internals.myNewMethod = {
method: (next) => {
return next();
},
options: {
cache: {
expiresIn: 60000,
generateTimeout: 60000
}
}
};
internals.anotherMethod = {
method: (next) => {
return next();
}
};
// This methods would be available as:
server.methods.methodFileName.myNewMethod();
server.methods.methodFileName.anotherMethod();
FAQs
Hapi plugin to autoload methods.
The npm package @flexshopper/hapi-methods receives a total of 2 weekly downloads. As such, @flexshopper/hapi-methods popularity was classified as not popular.
We found that @flexshopper/hapi-methods demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.