mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-11 17:53:59 +02:00
Remove lodash dependency
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
"immutable": "^3.8.1",
|
"immutable": "^3.8.1",
|
||||||
"is-empty": "^1.0.0",
|
"is-empty": "^1.0.0",
|
||||||
"keycode": "^2.1.2",
|
"keycode": "^2.1.2",
|
||||||
"lodash": "^4.13.1",
|
|
||||||
"type-of": "^2.0.1",
|
"type-of": "^2.0.1",
|
||||||
"ua-parser-js": "^0.7.10"
|
"ua-parser-js": "^0.7.10"
|
||||||
},
|
},
|
||||||
|
@@ -17,7 +17,6 @@ const jsdomGlobal = require('jsdom-global')
|
|||||||
jsdomGlobal()
|
jsdomGlobal()
|
||||||
|
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const _ = require('lodash')
|
|
||||||
const readMetadata = require('read-metadata')
|
const readMetadata = require('read-metadata')
|
||||||
const { Raw } = require('..')
|
const { Raw } = require('..')
|
||||||
const memoize = require('../lib/utils/memoize')
|
const memoize = require('../lib/utils/memoize')
|
||||||
@@ -97,7 +96,7 @@ function runBenchmarks() {
|
|||||||
setup() {
|
setup() {
|
||||||
const scope = global.getScope()
|
const scope = global.getScope()
|
||||||
// Each benchmark is given the chance to do its own setup
|
// Each benchmark is given the chance to do its own setup
|
||||||
const state = scope.benchmark.setup(
|
const state = scope.benchmark.setup( // eslint-disable-line no-unused-vars
|
||||||
scope.Raw.deserialize(scope.input, { terse: true })
|
scope.Raw.deserialize(scope.input, { terse: true })
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -141,10 +140,10 @@ function runBenchmarks() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function parseCommandLineOptions(process) {
|
function parseCommandLineOptions(process) {
|
||||||
let outputPath,
|
let outputPath
|
||||||
reference,
|
let reference
|
||||||
only,
|
let only
|
||||||
help = false
|
let help = false
|
||||||
|
|
||||||
const options = process.argv.slice(2)
|
const options = process.argv.slice(2)
|
||||||
|
|
||||||
@@ -224,12 +223,12 @@ function serializeResult(event) {
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
const { hz } = target
|
const { hz } = target
|
||||||
const { mean, rme } = target.stats
|
const { mean, rme, sample } = target.stats
|
||||||
const stats = _.pick(target.stats, [
|
const stats = {
|
||||||
'rme',
|
rme,
|
||||||
'mean',
|
mean,
|
||||||
'sample'
|
sample
|
||||||
])
|
}
|
||||||
|
|
||||||
Object.assign(result, {
|
Object.assign(result, {
|
||||||
hz,
|
hz,
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
import Parser from 'ua-parser-js'
|
import Parser from 'ua-parser-js'
|
||||||
import browser from 'detect-browser'
|
import browser from 'detect-browser'
|
||||||
import includes from 'lodash/includes'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export.
|
* Export.
|
||||||
@@ -18,7 +17,7 @@ export const IS_IOS = process.browser && browser.name == 'ios'
|
|||||||
export const IS_MAC = process.browser && new Parser().getOS().name == 'Mac OS'
|
export const IS_MAC = process.browser && new Parser().getOS().name == 'Mac OS'
|
||||||
export const IS_SAFARI = process.browser && browser.name == 'safari'
|
export const IS_SAFARI = process.browser && browser.name == 'safari'
|
||||||
export const IS_UBUNTU = process.browser && new Parser().getOS().name == 'Ubuntu'
|
export const IS_UBUNTU = process.browser && new Parser().getOS().name == 'Ubuntu'
|
||||||
export const IS_WINDOWS = process.browser && includes(new Parser().getOS().name, 'Windows')
|
export const IS_WINDOWS = process.browser && /Windows/.test(new Parser().getOS().name)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
IS_ANDROID,
|
IS_ANDROID,
|
||||||
|
Reference in New Issue
Block a user