graphology-utils
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "graphology-utils", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Miscellaneous utils for graphology.", | ||
@@ -8,3 +8,4 @@ "main": "index.js", | ||
"index.js", | ||
"is-graph.js" | ||
"is-graph.js", | ||
"is-graph-constructor.js" | ||
], | ||
@@ -11,0 +12,0 @@ "scripts": { |
@@ -34,1 +34,21 @@ # Graphology Utils | ||
``` | ||
### #.isGraphConstructor | ||
Function returning whether the given value is a `graphology` constructor. | ||
```js | ||
import Graph from 'graphology'; | ||
import {isGraphConstructor} from 'graphology-utils'; | ||
// Alternatively, if you want to only load the relevant code: | ||
import isGraphConstructor from 'graphology-utils/is-graph-constructor'; | ||
isGraphConstructor(Graph); | ||
>>> true | ||
isGraphConstructor(45); | ||
>>> false | ||
isGraphConstructor(new Graph()); | ||
>>> false | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4456
6
54
54