Socket
Socket
Sign inDemoInstall

is-svg

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-svg - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

31

index.d.ts
/// <reference types="node"/>
/**
* Check if a string or buffer is [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics).
*
* @param input - The data to check.
* @returns Whether `input` is SVG or not.
*/
export default function isSvg(input: string | Buffer): boolean;
declare const isSvg: {
/**
Check if a string or buffer is [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics).
@param input - The data to check.
@returns Whether `input` is SVG or not.
@example
```
import isSvg = require('is-svg');
isSvg('<svg xmlns="http://www.w3.org/2000/svg"><path fill="#00CD9F"/></svg>');
//=> true
```
*/
(input: string | Buffer): boolean;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function isSvg(input: string | Buffer): boolean;
// export = isSvg;
default: typeof isSvg;
};
export = isSvg;

@@ -23,2 +23,3 @@ 'use strict';

module.exports = isSvg;
// TODO: Remove this for the next major release
module.exports.default = isSvg;
{
"name": "is-svg",
"version": "4.0.0",
"version": "4.1.0",
"description": "Check if a string or buffer is SVG",

@@ -16,3 +16,3 @@ "license": "MIT",

"scripts": {
"test": "xo && ava && tsd-check"
"test": "xo && ava && tsd"
},

@@ -40,10 +40,10 @@ "files": [

"dependencies": {
"html-comment-regex": "^1.1.0"
"html-comment-regex": "^1.1.2"
},
"devDependencies": {
"@types/node": "^11.10.4",
"ava": "^1.2.1",
"tsd-check": "^0.3.0",
"@types/node": "^11.13.0",
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.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