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

polyclay

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polyclay - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

2

lib/persistence.js

@@ -40,2 +40,4 @@ // General storage interface.

modelfunc.prototype.keyfield = keyfield;
_.assign(modelfunc, persist.statics);

@@ -42,0 +44,0 @@ _.assign(modelfunc.prototype, persist.plugins);

2

package.json
{
"name": "polyclay",
"version": "1.5.1",
"version": "1.5.2",
"description": "a schema-enforcing model class for node with optional key-value store persistence",

@@ -5,0 +5,0 @@ "author": "C J Silverio <ceejceej@gmail.com>",

@@ -138,2 +138,19 @@ /*global describe:true, it:true, before:true, after:true */

it('stores the name of the key field on the prototype', function()
{
var Ephemeral = polyclay.Model.buildClass(
{
properties:
{
'id': 'string'
}
});
polyclay.persist(Ephemeral, 'id');
var obj = new Ephemeral();
obj.should.have.property('keyfield');
obj.keyfield.should.be.a('string');
assert(obj.keyfield === 'id', 'keyfield property not on object!');
});
it('throws when passed a model without polyclay attributes', function()

@@ -140,0 +157,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