摘要:
1 const moment = require( 'moment' ); 2 3 const begin_date = '2017-12-12', 4 end_date = '2018-01-19', 5 arr = getAllDays( begin_date, end_date ); 6 7 console.log( 'arr: ', arr ); 8 ... 阅读全文
摘要:
var assert = require('assert'); describe('mocha', function() { describe('#indexOf()', function() { it('mocha test', function() { var EQUAL = '0', RIGHT = '1',... 阅读全文
摘要:
const str = ',,,,' + ',,,'; const reg = /|\s))/g; console.log(str.replace(reg, '<$1p')); 阅读全文
摘要:
1. 文件撤销 以提问中修改了两个文件a、b为例,假设需要撤销文件a的修改,则修改后的两个文件: a、如果没有被git add到索引区 git checkout a 便可撤销对文件a的修改 b、如果被git add到索引区,但没有做git commit提交 1)使用git reset将a从索引区移除 阅读全文
摘要:
1 const request = require('request'), 2 fs = require('fs'), 3 path = require('path'); 4 5 6 const image_url = 'http://animalonline.info/wp-content/uploads/2015/01000/white-cat-9kspvw8... 阅读全文
摘要:
环境: nodejs - v6.2.0 阅读全文
摘要:
1 var assert = require('assert'); 2 describe('test', function() { 3 it('coc', function() { 4 var testCard01 = checkHKIDcard("AB987654(2)"); 5 assert(testCard01, true); 6 7... 阅读全文
摘要:
1. Largest Number For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. 阅读全文
摘要:
代码运行环境: nodejs + mochajs 阅读全文
摘要:
var should = require('should'); describe('Array', function() { describe('#indexOf()', function() { it('should return -1 when the value is not present', function() { true.should.be.eql(v... 阅读全文