Skip to content

Commit 9cabb2e

Browse files
committed
add benchmarks
1 parent d2c35ed commit 9cabb2e

File tree

17 files changed

+5762
-0
lines changed

17 files changed

+5762
-0
lines changed

benchmark/code/deep-object.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('deep-object').set;
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/deep-property.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('deep-property').set;
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/deep-set.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('deep-set');
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/deephas.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('deephas').set;
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/dot-prop.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('dot-prop').set;

benchmark/code/dot2val.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('dot2val').set;
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/es5-dot-prop.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('es5-dot-prop').set;
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/lodash-set.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('lodash.set');

benchmark/code/object-path-set.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('object-path-set');
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

benchmark/code/object-set.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const set = require('object-set');
2+
3+
module.exports = function(obj, path, value) {
4+
try {
5+
set(obj, path, value);
6+
} catch (err) {}
7+
return obj;
8+
};

0 commit comments

Comments
 (0)