8000 feat: remove loadash · gajus/youtube-player@666c837 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 666c837

Browse files
committed
feat: remove loadash
1 parent 5c084d8 commit 666c837

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

.babelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"plugins": [
3-
"lodash",
43
"transform-object-rest-spread",
54
"transform-flow-strip-types",
65
"add-module-exports"

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
"dependencies": {
1414
"debug": "^2.6.6",
1515
"load-script": "^1.0.0",
16-
"lodash": "^4.17.4",
1716
"sister": "^3.0.0"
1817
},
1918
"description": "YouTube IFrame Player API abstraction.",
2019
"devDependencies": {
2120
"ava": "^0.19.1",
2221
"babel-cli": "^6.24.1",
2322
"babel-plugin-add-module-exports": "^0.2.1",
24-
"babel-plugin-lodash": "^3.2.11",
2523
"babel-plugin-transform-flow-strip-types": "^6.22.0",
2624
"babel-plugin-transform-object-rest-spread": "^6.23.0",
2725
"babel-plugin-transform-runtime": "^6.23.0",

src/YouTubePlayer.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// @flow
22

3-
import _ from 'lodash';
43
import createDebug from 'debug';
54
import functionNames from './functionNames';
65
import eventNames from './eventNames';
@@ -29,7 +28,7 @@ YouTubePlayer.proxyEvents = (emitter: EmitterType): EventHandlerMapType => {
2928
const events = {};
3029

3130
for (const eventName of eventNames) {
32-
const onEventName = 'on' + _.upperFirst(eventName);
31+
const onEventName = 'on' + eventName.slice(0, 1).toUpperCase() + eventName.slice(1);
3332

3433
events[onEventName] = (event) => {
3534
debug('event "%s"', onEventName, event);

0 commit comments

Comments
 (0)
0