Sfoglia il codice sorgente

modify API

pull/342/head
Guillaume Vincent 8 anni fa
parent
commit
e30574ca92
5 ha cambiato i file con 10 aggiunte e 6 eliminazioni
  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 Vedi File

@@ -1 +1 @@
distribution
dist

+ 2
- 0
README.md Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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 Vedi File

@@ -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();
});


Caricamento…
Annulla
Salva