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

grasp

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grasp - npm Package Compare versions

Comparing version 0.6.0-beta to 0.6.0

8

lib/index.js
// Generated by LiveScript 1.5.0
(function(){
var path, acorn, squery, equery, async, minimatch, ref$, min, sortWith, lines, chars, split, join, map, Obj, format, formatResult, formatName, formatCount, replace, parseOptions, generateHelp, generateHelpForOption, help, _console, version, run, getQueryEngine, slice$ = [].slice, toString$ = {}.toString;
var path, squery, equery, async, minimatch, flowParser, ref$, min, sortWith, lines, chars, split, join, map, Obj, format, formatResult, formatName, formatCount, replace, parseOptions, generateHelp, generateHelpForOption, help, _console, version, run, getQueryEngine, slice$ = [].slice, toString$ = {}.toString;
path = require('path');
acorn = require('acorn');
squery = require('grasp-squery');

@@ -10,2 +9,3 @@ equery = require('grasp-equery');

minimatch = require('minimatch');
flowParser = require('flow-parser');
ref$ = require('prelude-ls'), min = ref$.min, sortWith = ref$.sortWith, lines = ref$.lines, chars = ref$.chars, split = ref$.split, join = ref$.join, map = ref$.map, Obj = ref$.Obj;

@@ -78,4 +78,4 @@ format = require('./format'), formatResult = format.formatResult, formatName = format.formatName, formatCount = format.formatCount;

switch (options.parser[0]) {
case 'acorn':
return [acorn, options.parser[1]];
case 'flow-parser':
return [flowParser, options.parser[1]];
default:

@@ -82,0 +82,0 @@ return [require(options.parser[0]), options.parser[1]];

@@ -19,3 +19,4 @@ // Generated by LiveScript 1.5.0

return function(arg$, replacementArg){
var origResults, ref$, filters, selector, that, e, results, rawPrepend, rawAppend, join, textOperations, filterName, argsStr, args, ref1$, pre, post, i$, len$, arg, result, n, len, rawResults, res$, outputString, this$ = this;
var noFilters, origResults, ref$, filters, selector, that, e, results, rawPrepend, rawAppend, join, textOperations, filterName, argsStr, args, ref1$, pre, post, i$, len$, arg, result, n, len, rawResults, res$, outputString, this$ = this;
noFilters = false;
if (/^\s*\|\s+/.test(replacementArg)) {

@@ -33,7 +34,10 @@ origResults = [node];

e = e$;
origResults = queryEngine.query(replacementArg, node);
filters = [];
noFilters = true;
}
}
}
if (noFilters || !origResults.length) {
origResults = queryEngine.query(replacementArg, node);
filters = [];
}
if (origResults.length) {

@@ -291,3 +295,4 @@ results = origResults;

replaceLines[replaceLines.length - 1] = replaceLast + "" + endContext;
inputLines.splice.apply(inputLines, [startLineNum, numberOfLines].concat(slice$.call(replaceLines)));
inputLines.splice(startLineNum, numberOfLines);
inputLines = inputLines.slice(0, startLineNum).concat(replaceLines).concat(inputLines.slice(startLineNum));
lineOffset += replaceLines.length - numberOfLines;

@@ -294,0 +299,0 @@ colOffset += endLen - endCol;

{
"name": "grasp",
"author": "George Zahariev",
"version": "0.6.0-beta",
"version": "0.6.0",
"homepage": "http://graspjs.com",

@@ -44,4 +44,4 @@ "description": "JavaScript structural search, replace, and refactor",

"optionator": "^0.8.0",
"grasp-squery": "^0.3.0",
"grasp-equery": "^0.3.1",
"grasp-squery": "^0.4.0",
"grasp-equery": "^0.4.0",
"grasp-syntax-javascript": "^0.2.0",

@@ -48,0 +48,0 @@ "levn": "^0.3.0",

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