浏览代码

modify API

pull/342/head
Guillaume Vincent 8 年前
父节点
当前提交
e30574ca92
共有 5 个文件被更改,包括 10 次插入6 次删除
  1. +1
    -1
      .gitignore
  2. +2
    -0
      README.md
  3. +2
    -1
      lesspass.js
  4. +2
    -2
      package.json
  5. +3
    -2
      tests/password-generator.tests.js

+ 1
- 1
.gitignore 查看文件

@@ -1 +1 @@
distribution
dist

+ 2
- 0
README.md 查看文件

@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/oslab-fr/lesspass-npm.svg?branch=master)](https://travis-ci.org/oslab-fr/lesspass-npm)

# LessPass Core

LessPass npm module use to generate unique password


+ 2
- 1
lesspass.js 查看文件

@@ -2,7 +2,8 @@ var text = require('./text');
var passwordGenerator = require('./password-generator');

module.exports = {
createPassword: createPassword
createPassword: createPassword,
createMasterPassword: passwordGenerator.createMasterPassword
};

function createPassword(masterPassword, entry) {


+ 2
- 2
package.json 查看文件

@@ -1,12 +1,12 @@
{
"name": "lesspass",
"version": "1.0.3",
"version": "1.1.0",
"description": "node.js stateless password management solution",
"main": "distribution/lesspass.js",
"scripts": {
"test": "mocha --compilers js:babel-core/register tests",
"test:watch": "npm run test -- -w",
"build": "babel lesspass.js text.js password-generator.js --presets babel-preset-es2015 --out-dir distribution",
"build": "babel lesspass.js text.js password-generator.js --presets babel-preset-es2015 --out-dir dist",
"prepublish": "npm test && npm run build"
},
"keywords": [


+ 3
- 2
tests/password-generator.tests.js 查看文件

@@ -1,5 +1,6 @@
var assert = require('assert');
var passwordGenerator = require('../password-generator');
var lesspass = require('../lesspass');

describe('passwordGenerator', function () {
describe('master password', function () {
@@ -7,7 +8,7 @@ describe('passwordGenerator', function () {
var email = 'test@lesspass.com';
var password = "password";

passwordGenerator.createMasterPassword(email, password).then(function (masterPassword) {
lesspass.createMasterPassword(email, password).then(function (masterPassword) {
assert.equal("90cff82b8847525370a8f29a59ecf45db62c719a535788ad0df58d32304e925d", masterPassword);
done();
});
@@ -16,7 +17,7 @@ describe('passwordGenerator', function () {
var email = 'test@lesspass.com';
var password = "password";

passwordGenerator.createMasterPassword(email, password).then(function (masterPassword) {
lesspass.createMasterPassword(email, password).then(function (masterPassword) {
assert.equal(64, masterPassword.length);
done();
});


正在加载...
取消
保存