Socket
Socket
Sign inDemoInstall

read-package-json

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-package-json - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "read-package-json",
"version": "0.0.8",
"version": "0.0.9",
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",

@@ -5,0 +5,0 @@ "description": "The thing npm uses to read package.json files with semantics and defaults and validation",

@@ -212,12 +212,9 @@ // vim: set softtabstop=16 shiftwidth=16:

var d = data.readme
if (!d) return
d = d.split('\n')
d = d.filter(function (line) {
return /\s+/.test(line)
&& line.trim() !== data.name
&& !line.trim().match(/^#/)
})[0]
d = d.trim()
d = d.replace(/\.$/, '')
if (d) data.description = d
if (!d) return;
// the first block of text before the first heading
// that isn't the first line heading
d = d.trim().split('\n')
for (var s = 0; d[s].trim().match(/^(#|$)/); s ++);
for (var e = s + 1; d[e].trim(); e ++);
data.description = d.slice(s, e).join(' ').trim()
}

@@ -224,0 +221,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc