Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "initials", | ||
"description": "initials for names", | ||
"main": "initials.js", | ||
"scripts": { | ||
"test": "standard initials.js test/initials-test.js && npm run -s test:node | tap-spec", | ||
"start": "npm run build:demo && beefy ./index.js --cwd=./demo", | ||
"build:demo": "browserify lib/initials.js -s initials -o demo/initials.js", | ||
"prebuild": "rimraf dist && mkdirp dist", | ||
"build": "browserify lib/initials.js -s initials -o dist/initials.js", | ||
"deploy": "npm run build:demo && npm run deploydocs", | ||
"test": "standard lib/initials.js test/initials-test.js && npm run -s test:node | tap-spec", | ||
"test:node": "node test/initials-test.js", | ||
"coverage": "istanbul cover test/initials-test.js && istanbul-coveralls ", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"deploydocs": "gh-pages-deploy", | ||
"predeploydocs": "./bin/authorize-push.js", | ||
"prepublish": "npm run build", | ||
"postpublish": "npm run deploy" | ||
}, | ||
"gh-pages-deploy": { | ||
"staticpath": "demo", | ||
"noprompt": true | ||
}, | ||
"repository": { | ||
@@ -22,5 +34,10 @@ "type": "git", | ||
"devDependencies": { | ||
"beefy": "^2.1.5", | ||
"browserify": "^11.2.0", | ||
"bootstrap-editable-table": "github:gr2m/bootstrap-editable-table#gh-pages", | ||
"gh-pages-deploy": "^0.3.0", | ||
"istanbul": "^0.3.5", | ||
"istanbul-coveralls": "^1.0.1", | ||
"mkdirp": "^0.5.1", | ||
"rimraf": "^2.4.3", | ||
"semantic-release": "^4.3.4", | ||
@@ -31,6 +48,3 @@ "standard": "^3.11.1", | ||
}, | ||
"release": { | ||
"branch": "gh-pages" | ||
}, | ||
"version": "2.0.0" | ||
"version": "2.1.0" | ||
} |
@@ -6,3 +6,3 @@ Initials. Because JD is shorter than John Doe | ||
[![Build Status](https://api.travis-ci.org/gr2m/initials.svg?branch=gh-pages)](https://travis-ci.org/gr2m/initials/) | ||
[![Build Status](https://api.travis-ci.org/gr2m/initials.svg)](https://travis-ci.org/gr2m/initials/) | ||
[![Dependencies Status](https://david-dm.org/gr2m/initials.svg)](https://david-dm.org/gr2m/initials) | ||
@@ -9,0 +9,0 @@ |
@@ -1,4 +0,13 @@ | ||
var initials = require('../initials') | ||
var initials = require('../lib/initials') | ||
var test = require('tape') | ||
test('has function', function (t) { | ||
t.is(typeof initials, 'function', 'has method initials') | ||
t.is(typeof initials.addTo, 'function', 'has method initials.addTo') | ||
t.is(typeof initials.parse, 'function', 'has method initials.parse') | ||
t.is(typeof initials.find, 'function', 'has method initials.find') | ||
t.end() | ||
}) | ||
test('initials(name)', function (t) { | ||
@@ -13,2 +22,3 @@ t.equal(initials('John Doe'), 'JD', 'John Doe ☛ JD') | ||
t.equal(initials('안형준'), '안형', '안형준 -> 안형') | ||
t.end() | ||
@@ -20,2 +30,3 @@ }) | ||
t.equal(initials('John D.', 3), 'JoD', 'John D. ☛ JoD') | ||
t.end() | ||
@@ -41,2 +52,3 @@ }) | ||
t.deepEqual(initials(['Moe Minutes', 'Moe Min']), ['MoM', 'MMi'], '["Moe Minutes", "Moe Min"] ☛ ["MoM", "MMi"]') | ||
t.end() | ||
@@ -58,2 +70,3 @@ }) | ||
}), ['JD', 'JDa'], 'respect existing initials') | ||
t.end() | ||
@@ -75,2 +88,3 @@ }) | ||
t.equal(initials.addTo('test.test@test.org <test.test@test.org>'), 'test.test@test.org (tt)', 'test.test@test.org <test.test@test.org> ☛ test.test@test.org (tt)') | ||
t.end() | ||
@@ -82,2 +96,3 @@ }) | ||
t.deepEqual(initials.addTo(['John Doe', 'Jane Dane']), ['John Doe (JDo)', 'Jane Dane (JDa)'], 'John Doe, Jane Dane ☛ John Doe (JDo), Jane Dane (JDa)') | ||
t.end() | ||
@@ -100,2 +115,3 @@ }) | ||
}), ['John Doe (JD)', 'Jane Dane (JDa)'], 'respect existing initials') | ||
t.end() | ||
@@ -109,2 +125,3 @@ }) | ||
t.deepEqual(initials.parse('John Doe <joe@example.com>'), {name: 'John Doe', initials: 'JD', email: 'joe@example.com'}, 'joe@example.com ☛ email: joe@example.com, initials: jo') | ||
t.end() | ||
@@ -115,2 +132,3 @@ }) | ||
t.deepEqual(initials.parse(['John Doe', 'Robert Roe', 'Larry Loe']), [{name: 'John Doe', initials: 'JD'}, {name: 'Robert Roe', initials: 'RR'}, {name: 'Larry Loe', initials: 'LL'}], 'John Doe, Robert Roe, Larry Loe ☛ name: John Doe, initials: JD; name: Robert Roe, initials: RR; name: Larry Loe, initials: LL') | ||
t.end() | ||
@@ -131,3 +149,5 @@ }) | ||
}), [{name: 'John Doe', initials: 'JD'}, {name: 'Jane Dane', initials: 'JDa'}], 'respect existing initials for multiple names') | ||
t.end() | ||
}) | ||
@@ -141,2 +161,3 @@ | ||
t.deepEqual(initials(['', '']), ['', ''], 'initials with multiple persons but no names') | ||
t.end() | ||
@@ -148,2 +169,3 @@ }) | ||
t.equal(initials('Mo'), 'Mo', 'name.length is < 3, so the initials are equal to name') | ||
t.end() | ||
@@ -150,0 +172,0 @@ }) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38121
10
843
12
4
2