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

krl-parser

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-parser - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

3

package.json
{
"name": "krl-parser",
"version": "0.11.1",
"version": "0.12.0",
"description": "Parse KRL source code into an AST",

@@ -41,2 +41,3 @@ "main": "src/index.js",

"dependencies": {
"comment-regex": "^1.0.0",
"excerpt-at-line-col": "^1.0.0",

@@ -43,0 +44,0 @@ "line-column": "^1.0.2",

@@ -40,13 +40,2 @@ # krl-parser

### name = extractRulesetName(src)
* `src` - your krl source code string
This function return the ruleset name. Or `undefined` if it's unable to parse it. This is handy when you need the ruleset name without the overhead of parsing the entire file.
```js
var extractRulesetName = require('krl-parser/src/extractRulesetName');
name = extractRulesetName('ruleset blah { ... }');
//-> "blah"
```
## Developing

@@ -53,0 +42,0 @@

@@ -1,7 +0,7 @@

var commentsRegExp = require('./commentsRegExp');
var commentsRegExp = require('comment-regex');
module.exports = function(src){
return src.replace(commentsRegExp, function(rep){
return src.replace(commentsRegExp(), function(rep){
return rep.replace(/[^\n]/g, ' ');
});
};

Sorry, the diff of this file is too big to display

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