New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

krl-stdlib

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-stdlib - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

package.json
{
"name": "krl-stdlib",
"version": "0.5.0",
"version": "0.5.1",
"description": "Standard library for KRL",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,3 +9,3 @@ var _ = require("lodash");

stdlib[op] = function(){
if(arguments.length === 0){
if(arguments.length === 1){
return;

@@ -401,2 +401,10 @@ }

stdlib["get"] = function(ctx, obj, path) {
return _.get(obj,path);
};
stdlib["set"] = function(ctx, obj, path, val) {
return _.set(obj,path,val);
};
module.exports = stdlib;

@@ -291,2 +291,34 @@ var _ = require("lodash");

tf("get", [obj, ["foo", "bar", "10"]], "I like cheese");
tf("get", [obj, "colors"], "many");
assertObjNotMutated();
// note that the "set" tests mutates the obj
tf("set", [obj, ["foo", "baz"], "qux"], {
"colors": "many",
"pi": [3, 1, 4, 1, 5, 6, 9],
"foo": {
"bar": {"10": "I like cheese"},
"baz": "qux"
}
});
tf("set", [obj, "flop", 12], {
"colors": "many",
"pi": [3, 1, 4, 1, 5, 6, 9],
"foo": {
"bar": {"10": "I like cheese"},
"baz": "qux"
},
"flop": 12
});
tf("set", [obj, "colors", ["R", "G", "B"]], {
"colors": ["R", "G", "B"],
"pi": [3, 1, 4, 1, 5, 6, 9],
"foo": {
"bar": {"10": "I like cheese"},
"baz": "qux"
},
"flop": 12
});
tf("intersection", [[2, 1], [2, 3]], [2]);

@@ -293,0 +325,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