File tree Expand file tree Collapse file tree 4 files changed +31
-1
lines changed
Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 1.0.2
2+ + Update docs and license
3+
14## 0.6.2
25+ Add changelog
36+ Convert utils build with babel
Original file line number Diff line number Diff line change 11{
22 "name" : " @tinkoff/utils" ,
3- "version" : " 1.0.1 " ,
3+ "version" : " 1.0.2 " ,
44 "author" : " Tinkoff team" ,
55 "scripts" : {
66 "release" : " node ./releaseUtils/index.js" ,
Original file line number Diff line number Diff line change 1+ import not from '../not' ;
2+
3+ describe ( 'utils/is/not' , ( ) => {
4+ it ( 'returns the logical inverse of passed arg' , ( ) => {
5+ expect ( not ( 1 ) ) . toBe ( false ) ;
6+ expect ( not ( 0 ) ) . toBe ( true ) ;
7+ expect ( not ( false ) ) . toBe ( true ) ;
8+ expect ( not ( '2323' ) ) . toBe ( false ) ;
9+ expect ( not ( { } ) ) . toBe ( false ) ;
10+ } ) ;
11+ } ) ;
Original file line number Diff line number Diff line change 1+ /**
2+ * A function that returns the `!` of its argument. It will return `true` when
3+ * passed false-y value, and `false` when passed a truth-y one.
4+ *
5+ * @param {* } a any value
6+ * @return {Boolean } the logical inverse of passed argument.
7+ * @example
8+ *
9+ * not(true); //=> false
10+ * not(false); //=> true
11+ * not(0); //=> true
12+ * not(1); //=> false
13+ */
14+ export default function not ( a ) {
15+ return ! a ;
16+ }
You can’t perform that action at this time.
0 commit comments