Socket
Socket
Sign inDemoInstall

cst

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cst - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

25

lib/Parser.js

@@ -18,8 +18,25 @@ 'use strict';

_classCallCheck(this, Parser);
this._strictModeEnabled = true;
}
_createClass(Parser, [{
key: 'isStrictModeEnabled',
value: function isStrictModeEnabled() {
return this._strictModeEnabled;
}
}, {
key: 'enableStrictMode',
value: function enableStrictMode() {
this._strictModeEnabled = true;
}
}, {
key: 'disableStrictMode',
value: function disableStrictMode() {
this._strictModeEnabled = false;
}
}, {
key: 'parse',
value: function parse(code, mode) {
var ast = this._parseAst(code, mode);
value: function parse(code) {
var ast = this._parseAst(code);
var tokens = this._processTokens(ast, code);

@@ -30,3 +47,3 @@ return (0, _elementTree.buildElementTree)(ast, tokens);

key: '_parseAst',
value: function _parseAst(code, mode) {
value: function _parseAst(code) {
var comments = [];

@@ -37,3 +54,3 @@ var tokens = [];

onComment: comments,
strictMode: !mode || mode === 'strict'
strictMode: this._strictModeEnabled
};

@@ -40,0 +57,0 @@ var ast = (0, _babelCore.parse)(code, opts);

4

package.json
{
"name": "cst",
"version": "0.0.2",
"version": "0.0.3",
"description": "JavaScript CST Implementation",

@@ -24,3 +24,3 @@ "author": "Marat Dulin",

"precommit": "npm test",
"release": "npm run build",
"release": "npm run build && npm publish",
"postpublish": "rm -Rf lib"

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