Socket
Socket
Sign inDemoInstall

resourceful

Package Overview
Dependencies
54
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

13

lib/resourceful/definers.js

@@ -162,13 +162,10 @@ var common = require('./common');

return val.replace(regexp, replacement);
}
}),
prefix: function (prefix) {
var matcher = new RegExp('^' + prefix + '(.*)');
return this.sanitize(function (val) {
},
prefix: function (val, prefix) {
var matcher = new RegExp('^' + prefix + '(.*)');
return !matcher.test(val)
? prefix + val
: val;
});
}
}
})
},

@@ -175,0 +172,0 @@ number: {

{
"name": "resourceful",
"description": "A storage agnostic resource-oriented ODM for building prototypical models with validation and sanitization.",
"version": "0.2.0",
"version": "0.2.1",
"url": "http://github.com/flatiron/resourceful",

@@ -6,0 +6,0 @@ "keywords": [

@@ -292,2 +292,11 @@ var assert = require('assert'),

}
},
"sanitize('lower').sanitize('prefix')": {
topic: function (p) {
p.sanitize('reset').sanitize('lower').sanitize('prefix', 'a-prefix/');
return new this.Resource({kind: 'HELLO-world'});
},
"and pass check": function (instance) {
assert.equal(instance.kind, 'a-prefix/hello-world');
}
}

@@ -294,0 +303,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc