Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pd-redis-childize

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pd-redis-childize - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

lib/extends-abandon.js

19

index.js
'use strict';
var extRemove = require('./lib/extends-remove');
var extAbandon = require('./lib/extends-abandon');
var phNm = require('pd-redis-record-parenthood-nm');
module.exports = function (Child, Parent) {
if (!Child.isRedisModel || Child.childized) {
var flagName = 'isKidOf' + Parent.modelName();
if (!Child.isRedisModel || Child[flagName]) {
return;
}
extRemove(Child, Parent);
Child.childized = true;
extAbandon(Child, Parent);
Child[Parent.modelName() + 'Kid'] = function (childSid) {
var cSid = (childSid + '').trim();
return {
abandon: function (parentSid) {
var abandonName = phNm.abandon(Parent.modelName());
return Child[abandonName](cSid, parentSid);
}
};
};
Child[flagName] = true;
};

5

package.json
{
"name": "pd-redis-childize",
"version": "0.1.0",
"version": "0.1.1",
"description": "To make a record model relate to its parent record model",

@@ -27,5 +27,6 @@ "main": "index.js",

"dependencies": {
"pd-redis-record-parenthood-nm": "^0.1.0",
"humanize-plus": "^1.5.0",
"pd-redis-record-parenthood-nm": "^0.1.1",
"q": "^1.2.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc