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

nimma

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nimma - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

dist/cjs/codegen/templates/to-object-literal.js

9

dist/cjs/codegen/fallback.js

@@ -15,2 +15,3 @@ 'use strict';

const FN_DECLARATION_REGEXP = /(?:function\s*)?\(([^)]+)\)\s*(?:=>)?\s*{?/;
class Fallback {

@@ -37,6 +38,6 @@ #modules = new Set();

this.extraCode = Reflect.apply(Function.toString, fn, []).replace(/\(([^)]+)\)/, (_, args) => {
this.extraCode = Reflect.apply(Function.toString, fn, []).replace(FN_DECLARATION_REGEXP, (_, args) => {
const arr = args.split(/[,\s]+/);
arr.length = 3;
return `(${arr.join(', ')})`;
return `(${arr.join(', ')}) => {`;
});

@@ -52,5 +53,5 @@ }

const args = Array.from(this.#deps.keys());
tree.push(builders.variableDeclaration('const', [builders.variableDeclarator(id, builders.callExpression(builders.callExpression(builders.identifier('Function'), [...args.map(builders.stringLiteral), builders.templateLiteral([builders.templateElement({
tree.push(builders.variableDeclaration('const', [builders.variableDeclarator(id, builders.callExpression(builders.memberExpression(builders.callExpression(builders.identifier('Function'), [builders.templateLiteral([builders.templateElement({
raw: `return ${this.extraCode}`
})], [])]), args.map(safeIdentifier)))]), 'program');
})], [])]), builders.identifier('call')), [builders.objectExpression(args.map(arg => builders.objectProperty(builders.stringLiteral(arg), safeIdentifier(arg))))]))]), 'program');
return id;

@@ -57,0 +58,0 @@ }

@@ -24,6 +24,6 @@ 'use strict';

}]
}, function (input, path, fn, JSONPath, toPath) {
JSONPath({
}, function (input, path, fn) {
this.JSONPath({
callback: result => void fn({
path: toPath(result.path.slice(1)),
path: this.toPath(result.path.slice(1)),
value: result.value

@@ -30,0 +30,0 @@ }),

@@ -16,2 +16,4 @@ 'use strict';

const FN_DECLARATION_REGEXP = /(?:function\s*)?\(([^)]+)\)\s*(?:=>)?\s*{?/;
var _modules = /*#__PURE__*/new WeakMap();

@@ -52,6 +54,6 @@

this.extraCode = Reflect.apply(Function.toString, fn, []).replace(/\(([^)]+)\)/, (_, args) => {
this.extraCode = Reflect.apply(Function.toString, fn, []).replace(FN_DECLARATION_REGEXP, (_, args) => {
const arr = args.split(/[,\s]+/);
arr.length = 3;
return `(${arr.join(', ')})`;
return `(${arr.join(', ')}) => {`;
});

@@ -67,5 +69,5 @@ }

const args = Array.from(_rollupPluginBabelHelpers.classPrivateFieldGet(this, _deps).keys());
tree.push(builders.variableDeclaration('const', [builders.variableDeclarator(id, builders.callExpression(builders.callExpression(builders.identifier('Function'), [...args.map(builders.stringLiteral), builders.templateLiteral([builders.templateElement({
tree.push(builders.variableDeclaration('const', [builders.variableDeclarator(id, builders.callExpression(builders.memberExpression(builders.callExpression(builders.identifier('Function'), [builders.templateLiteral([builders.templateElement({
raw: `return ${this.extraCode}`
})], [])]), args.map(safeIdentifier)))]), 'program');
})], [])]), builders.identifier('call')), [builders.objectExpression(args.map(arg => builders.objectProperty(builders.stringLiteral(arg), safeIdentifier(arg))))]))]), 'program');
return id;

@@ -72,0 +74,0 @@ }

@@ -24,6 +24,6 @@ 'use strict';

}]
}, function (input, path, fn, JSONPath, toPath) {
JSONPath({
}, function (input, path, fn) {
this.JSONPath({
callback: result => void fn({
path: toPath(result.path.slice(1)),
path: this.toPath(result.path.slice(1)),
value: result.value

@@ -30,0 +30,0 @@ }),

{
"name": "nimma",
"version": "0.1.0",
"version": "0.1.1",
"description": "JSONPath engine that scales.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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