loading...

5

前端有趣技巧网站

技巧读完大概需要6分钟

  • 发布时间:2019-03-26 16:43 星期二
  • 刘伟波
  • 1278
  • 更新于2019-07-05 13:15 星期五

收集前端一些好用的在技巧

1.照片位图转SVG矢量图片JS工具primitive.js

官方体验地址:https://ondras.github.io/primitive.js/

primitive.js功能及各个参数演示中文版

2.字符动画

http://images.liuweibo.cn/image/common/字符动画_1553590192226_239846_1553590206001.png
http://www.degraeve.com/img2txt.php

3.excel转json

https://www.bejson.com/json/col2json/

4.git-history的使用

https://user-images.githubusercontent.com/1911623/54575634-9b10b000-49d3-11e9-8a19-56e40636e45d.gif

git-history

使用方法,github.com或者gitlab.com.cn替换如下

  1. gitlab.githistory.xyz
  2. github.githistory.xyz

本地使用

npx git-file-history  path/a.vue

ES6新功能

https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
例子

const obj = {
  foo: {
    bar: {
      baz: class {
      },
    },
  },
};

const baz = new obj?.foo?.bar?.baz(); // baz instance

const safe = new obj?.qux?.baz(); // undefined
const safe2 = new obj?.foo.bar.qux?.(); // undefined

const willThrow = new obj?.foo.bar.qux(); // Error: not a constructor

// Top classes can be called directly, too.
class Test {
}
new Test?.(); // test instance

new exists?.(); // undefined

使用

npm install --save-dev @babel/plugin-proposal-optional-chaining

.babalerc

{
  "plugins": ["@babel/plugin-proposal-optional-chaining"]
}

快速下载youtobe视频

在链接中的“youtube”前面输入“ss”并点击回车键,可快速下载视频。

--
作者:刘伟波

链接:http://www.liuweibo.cn/p/250

来源:刘伟波博客

本文原创版权属于刘伟波 ,转载请注明出处,谢谢合作

你可能感兴趣的文章

    发表评论

    评论支持markdown,评论内容不能超过500字符
    关于技术问题或者有啥不懂的都可以来 我的视频空间 提问, 推荐作者总结知识点 前端知识体系, 感謝支持!

    阿斯顿发奥森