Skip to content

Commit 7deaa9c

Browse files
committed
Remove dependency
1 parent 55b8bbc commit 7deaa9c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var has = require('has');
3+
var own = {}.hasOwnProperty;
44

55
module.exports = stringify;
66

@@ -11,17 +11,17 @@ function stringify(value) {
1111
}
1212

1313
/* Node. */
14-
if (has(value, 'position') || has(value, 'type')) {
14+
if (own.call(value, 'position') || own.call(value, 'type')) {
1515
return location(value.position);
1616
}
1717

1818
/* Location. */
19-
if (has(value, 'start') || has(value, 'end')) {
19+
if (own.call(value, 'start') || own.call(value, 'end')) {
2020
return location(value);
2121
}
2222

2323
/* Position. */
24-
if (has(value, 'line') || has(value, 'column')) {
24+
if (own.call(value, 'line') || own.call(value, 'column')) {
2525
return position(value);
2626
}
2727

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"files": [
2323
"index.js"
2424
],
25-
"dependencies": {
26-
"has": "^1.0.1"
27-
},
25+
"dependencies": {},
2826
"devDependencies": {
2927
"browserify": "^14.1.0",
3028
"esmangle": "^1.0.0",

0 commit comments

Comments
 (0)