Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package maintenance #72

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"trailingComma": "es5",
"overrides": [
{
"files": ".prettierrc",
"files": ["**/.*rc", "**/*.json"],
"options": { "parser": "json" }
}
]
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017-2022 concolor contributors
Copyright (c) 2017-2023 concolor contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ console.log(theme.caption('Caption example'));

## License & Contributors

Copyright (c) 2017-2022 [Metarhia contributors](https://github.com/metarhia/concolor/graphs/contributors).
Copyright (c) 2017-2023 [Metarhia contributors](https://github.com/metarhia/concolor/graphs/contributors).
Concolor is [MIT licensed](./LICENSE).\
Concolor is a part of [Metarhia](https://github.com/metarhia) technology stack.
12 changes: 0 additions & 12 deletions concolor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const ANSI = [

const esc = (code, s) => `\x1b[${code}m${s}\x1b[0m`;

// Create escape sequence from concolor style definition
// styles:string - comma separated styles
// s:string - value to stylize
const stylize = (styles, s) => {
const list = styles.split(',');
let result = s;
Expand All @@ -48,10 +45,6 @@ const stylize = (styles, s) => {
return result;
};

// Create tag function
// styles:string - wrap tag into styles
// strings:array - array of string or string
// values:array - array of string
const tag =
(styles) =>
(strings, ...values) => {
Expand All @@ -67,8 +60,6 @@ const tag =
return stylize(styles, result.join(''));
};

// Create theme tag
// tags:string - theme tags
const theme = (tags) => {
const styles = (strings, ...values) => {
const result = [strings[0]];
Expand All @@ -91,9 +82,6 @@ const theme = (tags) => {
return styles;
};

// Concolor main function
// strings:array - array of string or string
// values:array - array of string
const concolor = (strings, ...values) => {
if (typeof strings === 'string') {
return tag(strings);
Expand Down
Loading