Socket
Socket
Sign inDemoInstall

annostring

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

annostring - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

18

lib/extract.js

@@ -6,9 +6,15 @@ var annotate = require('annotate');

module.exports = annotate('extract', 'Extracts the part of `str` between `start` and `end`').
on(is.string, is.string, is.string, function(str, start, end) {
var s = str.split(start)[1];
on(is.string, is.string, is.string, extract).
on(is.string, is.string, function(str, start) {
return extract(str, start);
}).
satisfies(is.string);
if(!is.defined(s)) return '';
function extract(str, start, end) {
var s = str.split(start)[1];
return s.trim().split(end)[0].trim();
}).
satisfies(is.string);
if(!is.defined(s)) return '';
return s.trim().split(end)[0].trim();
}

@@ -5,3 +5,3 @@ {

"author": "Juho Vepsalainen <bebraw@gmail.com>",
"version": "0.2.1",
"version": "0.2.2",
"dependencies": {

@@ -8,0 +8,0 @@ "annois": "0.3.0",

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