gr2m / initials Goto Github PK
View Code? Open in Web Editor NEWextract initials from and add initials to names
Home Page: https://gr2m.github.io/initials
License: MIT License
extract initials from and add initials to names
Home Page: https://gr2m.github.io/initials
License: MIT License
interestingly, initials.addTo('안형준')
works as expected.
4.11.0
to 4.12.0
.This version is covered by your current version range and after updating it in your project the build failed.
tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 9 commits.
42c84d6
v4.12.0
3e0a341
[Deps] update is-regex
, string.prototype.trim
ba7e2b2
[Dev Deps] update eslint
f3a5925
[Tests] use shared travis-ci configs
6e94800
[Deps] update deep-equal
, glob
, object-inspect
, resolve
, string.prototype.trim
8150c3b
[Refactor] use is-regex
instead of instanceof RegExp
24487cb
add tap-nyc to pretty-reporters
c283615
[New] when the error type is wrong, show the message and stack
44cbbf5
[Tests] add a test for the wrong kind of error
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
15.10.6
to 15.10.7
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 2 commits.
3c8177a
fix: add debug logs for config file path
6d0bd8c
fix: add debug logs for plugins resolved options
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
initials.addTo('funky (fu)')
// expected: funky (fu)
// actual: nky fu (fu)
Branch | Build failing 🚨 |
---|---|
Dependency |
semantic-release
|
Current Version | 15.4.4 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 2 commits.
db1cc60
feat: verify minimum required git version is installed
47c73eb
feat: add support for git version 2.0.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
use case: multiple fields that might contain the same names. Example:
In that case I'd like initials for 'John Doe' to be 'JD', and for 'John Doe, Jane Dane' to be 'JD, JDa' instead of 'JDo, JDa'
suggested API:
// pass existing initials for names
initials(['John Doe', 'Jane Dane'], {
existing: { 'John Doe': 'JD' }
})
// ['JD', 'JDa']
4.12.0
to 4.12.1
.This version is covered by your current version range and after updating it in your project the build failed.
tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
25bcbc6
v4.12.1
9094271
[Fix] error stack file path can contain parens/spaces
b765bba
[Deps] update resolve
949781f
[Dev Deps] update eslint
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
15.13.27
to 15.13.28
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
1693073
fix(package): update execa to version 3.2.0
2f3d934
fix: require Node.js >=8.16
f645547
docs(recipes): GitHub actions (#1317)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
2.6.3
to 2.7.0
.This version is covered by your current version range and after updating it in your project the build failed.
rimraf is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
should become [email protected] (tt) <[email protected]>
, but becomes test test test org ([email protected] <[email protected]>) <[email protected]>
15.13.20
to 15.13.21
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 3 commits.
391af98
fix(package): update hosted-git-info to version 3.0.0
d45d8b6
docs: fix typo
519df0d
chore: remove commitizen from our dependencies
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
First off, thanks for putting this library together! I noticed this error while developing today:
node_modules/initials/index.d.ts:20:2 - error TS2309: An export assignment cannot be used in a module with other exported elements.
export = initials;
~~~~~~~~~~~~~~~~~~
Changing this line to export default initials
fixes the error.
TypeScript version: 3.9.5
initials version: 3.1.0
I'm happy to open a follow-up pull request.
15.13.32
to 15.14.0
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
envi-ci
values to plugins context (a8c747d)The new version differs by 2 commits.
a8c747d
feat: pass envi-ci
values to plugins context
fc70726
chore: add Mockserver generated file to gitignore
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
I'd like to invite new contributors to this repository or open source in general to send a PR for this issue. Please let me know if you need any guidance, and if you want to give it a try, comment on the issue so others will now that it's taken.
You will need to install git & Node.js to work on this issue. Here are the steps you will need to set up the project locally, run the tests to see the problem, and fix it once you're done :)
npm install
initials/test/initials-test.js
Line 43 in 906502d
npm test
. You should see something like this: npm test
until all tests are greenHello,
First off, thanks for sharing this project :)
I know that the project already says that the code is MIT licensed, but could you please also add a LICENSE file containing the text of the MIT license?
My understanding is that this may be necessary in order for the code to be considered legally licensed under MIT.
Babel recently went through something similar: babel/babel#7308
This issue is reserved for people who never contributed to Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
🙋 Claim this issue: @sofiarivas
👌 Accept our invitation to this repository. Once accepted, assign yourself to this repository
📝 Update the file README.md in the initials
repository (press the little pen Icon) and edit the line as shown below.
@@ -88,7 +88,7 @@ npm test
Fine Print
----------
-initials have been authored by [Gregor Martynus](https://github.com/gr2m),
+initials has been authored by [Gregor Martynus](https://github.com/gr2m),
proud member of the [Hoodie Community](http://hood.ie/).
License: MIT
💾 Commit your changes
🔀 Start a Pull Request. There are two ways how you can start a pull request:
🏁 Done Ask in comments for a review :)
Leave a comment below!
This issue was created by First-Timers-Bot.
4.12.1
to 4.13.0
.This version is covered by your current version range and after updating it in your project the build failed.
tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 6 commits.
1fba54a
v4.13.0
e0e2542
[New] tape
binary: Add -i flag to ignore files from gitignore (#492)
0f15085
[Deps] update resolve
0330d82
[New] add t.match()
and t.doesNotMatch()
, new in node
v13.6
21ac403
[Tests] handle stack trace variation in node <= 0.8
d7c2fd3
[lint] fix object key spacing
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
15.13.28
to 15.13.29
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 2 commits.
7a939a8
fix: use authenticated URL to check if local branch is up to date
9eaf955
docs(contributing): correct lint fix command
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Jan-Erik
doesn't get an initial.
Do we treat this as a bug @gr2m?
Branch | Build failing 🚨 |
---|---|
Dependency |
tape
|
Current Version | 4.9.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 10 commits.
050b318
v4.9.1
73232c0
[Dev Deps] update js-yaml
8a2d29b
[Deps] update has
, for-each
, resolve
, object-inspect
c6f5313
[Tests] add eclint and eslint, to enforce a consistent style
45788a5
[Dev Deps] update concat-stream
ec4a71d
[fix] Fix bug in functionName regex during stack parsing
7261ccc
Merge pull request #433 from mcnuttandrew/add-trb
6cbc53e
Add tap-react-browser
9d501ff
[Dev Deps] use ~ for dev deps; update to latest nonbreaking
24e0a8d
Fix spelling of "parameterize"
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
main
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project ✨
Your semantic-release bot 📦🚀
module.exports = initials
, without checking for define
, and the wrapper functions anymore. Rename file to index.js
and make it the "main" in package.json/initials.js
. beefy could be a simple option for that, the npm start task could look like beefy ./index.js --cwd=./demo
coverage/
in it, so that /dist
gets added to published pacakge)/demo
, 3. gh-pages-deploy of /demo
folderrelease.branch
setting in package.jsonbranches
setting in .travis.yml
That should be it :) @zoepage want to give this a go? Does it all make sense?
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Are there any plans to add TypeScript support?
16.3.0
to 16.4.0
.This version is covered by your current version range and after updating it in your project the build failed.
browserify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
8980670
16.4.0
f871a85
Update changelog.markdown
52de2c4
Merge pull request #1916 from browserify/stream-http
5dc1bf2
Upgrade stream-http to v3
4a5ea7e
Add funding.yml
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
currently is Fr nk d (Fnd)
Currently it has
type NameOrNames = string | string[];
function initials(nameOrNames: NameOrNames, options?: Options): string | string[];
which adds additional pain to the user who has to deal with the fact that
const myInitials: string = initials('John Doe');
won't compile, besides documentation explicitly saying that the result will be JD
(i.e. string
).
type NameOrNames = string | string[];
function initials<T extends NameOrNames>(nameOrNames: T, options?: Options): T;
In this case if array is passed as a first argument, then function returns an array. And if it's just a string then its return type also is just a string.
after cloning the repositories, install dependencies with npm install
and then run npm run test:coverage
. That will create the coverage/lcov-report/
folder. Open coverage/lcov-report/index.html
to see what lines / branches are not yet covered
@gr2m
Is it possible to move the initials.js to a specs folder or would it break something?
I'd love to add a cleaned up structure for all the modules.
Hi @gr2m, thank you for open-sourcing this library!
I noticed when I pass in a single word, it returns the first two letters of that name as the initial. That too me felt counter-intuitive, since initials tend to be the first letter from each word. I wonder if the behavior should accomodate for providing just one letter (either by default or as a param) per word - in which case if someone passed in "Github", it would return just "G".
Thoughts?
16.0.0
to 16.0.1
.This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Branch | Build failing 🚨 |
---|---|
Dependency |
semantic-release
|
Current Version | 15.4.2 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 5 commits.
a387c04
fix(package): update marked to version 0.4.0
228451b
docs: fix typo
3503407
docs: clarify which commit types trigger a release
5025fca
docs: fix FAQ heading level
6693080
style: fix table indentation
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Emojis ends up as an illegal character:
t.equal(initials('John 🐐face'), 'J🐐', 'John 🐐face (j🐐) ☛ j🐐');
✖ John 🐐face (j🐐) ☛ j🐐
--------------------------
operator: equal
expected: 'J🐐'
actual: 'J�'
stack: |-
☝️ Greenkeeper’s updated Terms of Service will come into effect on April 6th, 2018.
Branch | Build failing 🚨 |
---|---|
Dependency | standard |
Current Version | 11.0.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 20 commits.
670a3be
authors
b7e6cbc
11.0.1
34a3c40
Merge pull request #1092 from watson/elastic-logo
5382643
Replace Opbeat with Elastic logo
c40c799
Merge pull request #1091 from mackermans/master
504fcff
docs(README): update typeform logo
a5b779f
Swap README.md and RULES.md symlinks (#1090)
e818224
Merge pull request #1072 from standard/greenkeeper/eslint-plugin-react-7.7.0
9dc888f
Merge branch 'master' into greenkeeper/eslint-plugin-react-7.7.0
a5293dd
Merge pull request #1075 from standard/greenkeeper/eslint-plugin-import-2.9.0
ebf6620
Merge pull request #1087 from standard/greenkeeper/eslint-plugin-promise-3.7.0
116a871
fix(package): update eslint-plugin-promise to version 3.7.0
738edc4
readme: add standard talk
c93ac0d
Merge pull request #1076 from tumobi/fix-links
4f8c1f5
Fix webstorm.md links
There are 20 commits in total.
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Is it possible to limit initials to two characters? while maintaining the "uniqueness", of course until all permutations exhausted.
As far as we have bootstrap-editable-table as bower dependency atm, I'd like to remove it and load bootstrap-editable-table via npm. Is this possible atm @gr2m?
Branch | Build failing 🚨 |
---|---|
Dependency | semantic-release |
Current Version | 15.9.7 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
e882096
fix(package): update get-stream to version 4.0.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
For different names same initials appear. We need not just compare the Strings, but also the length of the name.
// scheme
['Moe Minutes', 'Moe Min'] -> ['MMi', 'MMi']
// test
t.deepEqual(initials(['Moe Minutes', 'Moe Min'], 3), ['MMi', 'MMi'], 'not same name')
t.deepEqual(initials(['Moe Minutes', 'Moe Mina'], 3), ['MMi', 'MoM'], 'not same name')
Start: function initialsForMultipleNames (names, options)
Branch | Build failing 🚨 |
---|---|
Dependency | semantic-release |
Current Version | 15.9.14 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 1 commits.
7b8cd99
fix(package): update debug to version 4.0.0
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.