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

@putout/engine-parser

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/engine-parser - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

4

lib/template.js

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

return result;
return result.expression || result;
});

@@ -34,4 +34,4 @@

return result;
return result.expression || result;
};

@@ -5,4 +5,22 @@ 'use strict';

const template = require('./template');
const {
Identifier,
StringLiteral,
} = require('@babel/types');
test('parser: template: ast: fresh', (t) => {
const buildRequire = template(`
var %%importName%% = require(%%source%%);
`);
const ast = buildRequire({
importName: Identifier('myModule'),
source: StringLiteral('my-module'),
});
t.notOk(ast.expression);
t.end();
});
test('parser: template: ast: fresh', (t) => {
const one = template.ast.fresh('const hello = "world"');

@@ -9,0 +27,0 @@ one.x = 'zzz';

{
"name": "@putout/engine-parser",
"version": "1.3.0",
"version": "1.4.0",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -15,2 +15,8 @@ "description": "putout parser",

},
"nyc": {
"exclude": [
"**/*.spec.js",
"test"
]
},
"scripts": {

@@ -17,0 +23,0 @@ "test": "madrun test",

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