![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.
mongoose-keywords
Advanced tools
Mongoose plugin that recursively generates keywords for documents based on its fields
Mongoose plugin that recursively generates keywords for documents based on its fields
npm install --save mongoose-keywords
var mongoose = require('mongoose');
var ArtistSchema = new mongoose.Schema({
name: String
});
ArtistSchema.plugin(require('mongoose-keywords'), {paths: ['name']});
var Artist = mongoose.model('Artist', ArtistSchema);
var artist = new Artist({name: "L'arc~en~Ciel"});
console.log(artist.keywords); // ['larc en ciel']
var mongoose = require('mongoose');
var ArtistSchema = new mongoose.Schema({
name: String,
genre: String
});
ArtistSchema.plugin(require('mongoose-keywords'), {paths: ['name', 'genre']});
var Artist = mongoose.model('Artist', ArtistSchema);
var artist = new Artist({name: "L'arc~en~Ciel", genre: 'Jrock'});
console.log(artist.keywords); // ['larc en ciel', 'jrock']
keywords
fieldvar mongoose = require('mongoose');
var ArtistSchema = new mongoose.Schema({
name: String
});
ArtistSchema.plugin(require('mongoose-keywords'), {
paths: ['name'],
field: 'terms'
});
var Artist = mongoose.model('Artist', ArtistSchema);
var artist = new Artist({name: "L'arc~en~Ciel"});
console.log(artist.keywords); // undefined
console.log(artist.terms); // ['larc en ciel']
var mongoose = require('mongoose');
var mongooseKeywords = require('mongoose-keywords');
var GenreSchema = new mongoose.Schema({
title: String
});
GenreSchema.plugin(mongooseKeywords, {paths: ['title']});
var ArtistSchema = new mongoose.Schema({
name: String,
genre: {
type: mongoose.Schema.ObjectId,
ref: 'Genre'
}
});
ArtistSchema.plugin(mongooseKeywords, {paths: ['name', 'genre']});
var Genre = mongoose.model('Genre', GenreSchema);
var genre = new Genre({title: 'Jrock'});
console.log(genre.keywords); // ['jrock']
var Artist = mongoose.model('Artist', ArtistSchema);
var artist = new Artist({name: "L'arc~en~Ciel", genre: genre});
console.log(artist.keywords); // ['larc en ciel', 'jrock']
MIT © Diego Haz
FAQs
Mongoose plugin that recursively generates keywords for documents based on its fields
The npm package mongoose-keywords receives a total of 414 weekly downloads. As such, mongoose-keywords popularity was classified as not popular.
We found that mongoose-keywords 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.
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.