- 博客(4)
- 收藏
- 关注
原创 2021-04-20
bodyparser已被弃用如何解决啊?加上了bodyparser中间件后post请求错误,去掉了反而能正常发出post请求。
2021-04-20 22:05:28 113
原创 js对象的规则描述语言和验证器joi第三方库和 密码加密第三方库bcrypt的使用
密码加密第三方库 bcrypt加密方式 : 哈希加密(单程加密),即只能加密但不能反向解密.依赖环境 : python node-gyp(-g) windows-build-tools使用方法 :一 导入bcrypt模块const bcrypt = require(‘bcrypt’);二 生成随机字符串(salt盐)let salt = await bcrypt.genSalt(10), 默认是10;三 使用hash方法和随机字符串对密码进行加密let pass = await bcryp
2020-11-10 21:50:19 921
原创 js中forEach,some,filter的使用
一.forEach的使用forEach()方法 遍历数组语法:array.forEach(function(currentValue,index,arr){})array:哪一个数组currentValue:数组当前项的值index:数组当前项的索引arr:数组对象本身 let arr = [1, 2, 3]; arr.forEach(function (value, index, array) { console.log(value);// 1 0 数组对象
2020-11-09 19:44:15 774
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人