Skip to content

Commit

Permalink
Merge f95b67c into 6f66055
Browse files Browse the repository at this point in the history
  • Loading branch information
osorokotyaga committed Oct 5, 2018
2 parents 6f66055 + f95b67c commit d1822a0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,6 @@
## 1.0.2
+ Update docs and license

## 0.6.2
+ Add changelog
+ Convert utils build with babel
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@tinkoff/utils",
"version": "1.0.1",
"version": "1.0.2",
"author": "Tinkoff team",
"scripts": {
"release": "node ./releaseUtils/index.js",
Expand Down
11 changes: 11 additions & 0 deletions src/is/__tests__/not.js
@@ -0,0 +1,11 @@
import not from '../not';

describe('utils/is/not', () => {
it('returns the logical inverse of passed arg', () => {
expect(not(1)).toBe(false);
expect(not(0)).toBe(true);
expect(not(false)).toBe(true);
expect(not('2323')).toBe(false);
expect(not({})).toBe(false);
});
});
16 changes: 16 additions & 0 deletions src/is/not.js
@@ -0,0 +1,16 @@
/**
* A function that returns the `!` of its argument. It will return `true` when
* passed false-y value, and `false` when passed a truth-y one.
*
* @param {*} a any value
* @return {Boolean} the logical inverse of passed argument.
* @example
*
* not(true); //=> false
* not(false); //=> true
* not(0); //=> true
* not(1); //=> false
*/
export default function not(a) {
return !a;
}

0 comments on commit d1822a0

Please sign in to comment.