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

bjorling

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bjorling - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

19

bjorling-keys.js
var keyName = '$key'
, keys = {}
function getKey(projectionName, obj) {
return keys[projectionName](obj)
function addKey(projectionName, key) {
keys[projectionName] = isFunction(key) ? key : createSingleNameKeyFn(key)
}
function createSingleNameKeyFn(key) {
return function(obj) {
return obj[key]
}
}
function isFunction(obj) {
return Object.prototype.toString.call(obj) === '[object Function]'
}
function isKey(name) {

@@ -12,4 +22,5 @@ return name === keyName

function addKey(projectionName, keyFn) {
keys[projectionName] = keyFn
function getKey(projectionName, obj) {
return keys[projectionName](obj)
}

@@ -16,0 +27,0 @@

@@ -47,2 +47,6 @@ var _ = require('underscore')

function setData(projectionName, data) {
projections[projectionName] = data
}
function update(projectionName, state) {

@@ -59,2 +63,3 @@ var key = keys(projectionName, state)

module.exports.save = save
module.exports.setData = setData
module.exports.update = update

@@ -34,2 +34,6 @@ var _ = require('underscore')

function setData(projectionName, data) {
projections[projectionName] = data
}
module.exports = {

@@ -39,2 +43,3 @@ filter: filter

, save: save
, setData: setData
}

@@ -51,2 +51,10 @@ var path = require('path')

function setData(data) {
storage.setData(projectionName, data)
}
function setKey(key) {
keys.add(projectionName, key)
}
return {

@@ -56,2 +64,4 @@ getByKey: getByKey

, where: where
, setData: setData
, setKey: setKey
}

@@ -58,0 +68,0 @@ }

@@ -31,3 +31,3 @@ {

, "main": "./bjorling.js"
, "version": "0.0.4"
, "version": "0.0.5"
}
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