Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

initials

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

initials - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

bin/authorize-push.js

28

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc