mdast-util-definitions
Advanced tools
Comparing version 1.2.1 to 1.2.2
'use strict'; | ||
var visit = require('unist-util-visit'); | ||
var has = require('has'); | ||
module.exports = getDefinitionFactory; | ||
var own = {}.hasOwnProperty; | ||
/* Get a definition in `node` by `identifier`. */ | ||
@@ -27,3 +28,3 @@ function getDefinitionFactory(node, options) { | ||
var id = normalise(definition.identifier); | ||
if (!has(cache, id)) { | ||
if (!own.call(cache, id)) { | ||
cache[id] = definition; | ||
@@ -45,3 +46,3 @@ } | ||
var id = identifier && normalise(identifier); | ||
return id && has(cache, id) ? cache[id] : null; | ||
return id && own.call(cache, id) ? cache[id] : null; | ||
} | ||
@@ -48,0 +49,0 @@ } |
{ | ||
"name": "mdast-util-definitions", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Find definition nodes in mdast nodes", | ||
@@ -16,3 +16,2 @@ "license": "MIT", | ||
"dependencies": { | ||
"has": "^1.0.1", | ||
"unist-util-visit": "^1.0.0" | ||
@@ -19,0 +18,0 @@ }, |
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
1
5822
- Removedhas@^1.0.1
- Removedhas@1.0.4(transitive)