%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/old/usr/lib/node_modules/hexo/lib/plugins/console/list/
Upload File :
Create Path :
Current File : //data/old/usr/lib/node_modules/hexo/lib/plugins/console/list/common.js

'use strict';

const strip = require('strip-ansi');

exports.stringLength = str => {
  str = strip(str);

  const len = str.length;
  let result = len;

  // Detect double-byte characters
  for (let i = 0; i < len; i++) {
    if (str.charCodeAt(i) > 255) {
      result++;
    }
  }

  return result;
};

Zerion Mini Shell 1.0