|
154 | 154 | belt = this.name == "Lo-Dash" ? lodash : _;\ |
155 | 155 | \ |
156 | 156 | var index,\ |
| 157 | + date = new Date,\ |
157 | 158 | limit = 20,\ |
| 159 | + regexp = /x/,\ |
158 | 160 | object = {},\ |
159 | 161 | objects = Array(limit),\ |
160 | 162 | numbers = Array(limit),\ |
|
941 | 943 |
|
942 | 944 | /*--------------------------------------------------------------------------*/ |
943 | 945 |
|
| 946 | +suites.push( |
| 947 | +Benchmark.Suite('`_.isArguments`, `_.isDate`, `_.isFunction`, `_.isNumber`, `_.isRegExp`') |
| 948 | +.add('Lo-Dash','\ |
| 949 | + lodash.isArguments(arguments);\ |
| 950 | + lodash.isArguments(object);\ |
| 951 | + lodash.isDate(date);\ |
| 952 | + lodash.isDate(object);\ |
| 953 | + lodash.isFunction(lodash);\ |
| 954 | + lodash.isFunction(object);\ |
| 955 | + lodash.isNumber(1);\ |
| 956 | + lodash.isNumber(object);\ |
| 957 | + lodash.isRegExp(regexp);\ |
| 958 | + lodash.isRegExp(object);' |
| 959 | +) |
| 960 | +.add('Underscore','\ |
| 961 | + _.isArguments(arguments);\ |
| 962 | + _.isArguments(object);\ |
| 963 | + _.isDate(date);\ |
| 964 | + _.isDate(object);\ |
| 965 | + _.isFunction(_);\ |
| 966 | + _.isFunction(object);\ |
| 967 | + _.isNumber(1);\ |
| 968 | + _.isNumber(object);\ |
| 969 | + _.isRegExp(regexp);\ |
| 970 | + _.isRegExp(object);' |
| 971 | +) |
| 972 | +); |
| 973 | + |
| 974 | +/*--------------------------------------------------------------------------*/ |
| 975 | + |
944 | 976 | suites.push( |
945 | 977 | Benchmark.Suite('`_.keys` (uses native `Object.keys` if available)') |
946 | 978 | .add('Lo-Dash','\ |
|