Comparing version 1.6.0 to 1.6.1
@@ -10,3 +10,3 @@ declare type DefinitelyString<T> = Extract<T, string> extends never ? string : Extract<T, string> extends any ? string : Extract<T, string>; | ||
* R.isString('string') //=> true | ||
* R.iString(1) //=> false | ||
* R.isString(1) //=> false | ||
* @category Guard | ||
@@ -13,0 +13,0 @@ */ |
@@ -12,3 +12,3 @@ "use strict"; | ||
* R.isString('string') //=> true | ||
* R.iString(1) //=> false | ||
* R.isString(1) //=> false | ||
* @category Guard | ||
@@ -15,0 +15,0 @@ */ |
@@ -23,5 +23,5 @@ /** | ||
function strict<T extends Record<PropertyKey, unknown>>(source: T): Array<{ | ||
[K in keyof T]: K extends string | number ? `${K}` : never; | ||
[K in keyof T]-?: K extends string | number ? `${K}` : never; | ||
}[keyof T]>; | ||
} | ||
//# sourceMappingURL=keys.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var keys_1 = require("./keys"); | ||
var pipe_1 = require("./pipe"); | ||
describe('Test for keys', function () { | ||
@@ -12,7 +13,19 @@ it('should return keys of array', function () { | ||
describe('strict', function () { | ||
var actual = keys_1.keys.strict({ 5: 'x', b: 'y', c: 'z' }); | ||
expect(actual).toEqual(['5', 'b', 'c']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
it('should return strict types', function () { | ||
var actual = keys_1.keys.strict({ 5: 'x', b: 'y', c: 'z' }); | ||
expect(actual).toEqual(['5', 'b', 'c']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
}); | ||
it('should work with Partial in pipe', function () { | ||
var data = { | ||
foo: '1', | ||
bar: 7, | ||
}; | ||
var actual = (0, pipe_1.pipe)(data, keys_1.keys.strict); | ||
expect(actual).toEqual(['foo', 'bar']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
}); | ||
}); | ||
}); |
@@ -10,3 +10,3 @@ declare type DefinitelyString<T> = Extract<T, string> extends never ? string : Extract<T, string> extends any ? string : Extract<T, string>; | ||
* R.isString('string') //=> true | ||
* R.iString(1) //=> false | ||
* R.isString(1) //=> false | ||
* @category Guard | ||
@@ -13,0 +13,0 @@ */ |
@@ -9,3 +9,3 @@ /** | ||
* R.isString('string') //=> true | ||
* R.iString(1) //=> false | ||
* R.isString(1) //=> false | ||
* @category Guard | ||
@@ -12,0 +12,0 @@ */ |
@@ -23,5 +23,5 @@ /** | ||
function strict<T extends Record<PropertyKey, unknown>>(source: T): Array<{ | ||
[K in keyof T]: K extends string | number ? `${K}` : never; | ||
[K in keyof T]-?: K extends string | number ? `${K}` : never; | ||
}[keyof T]>; | ||
} | ||
//# sourceMappingURL=keys.d.ts.map |
import { keys } from './keys'; | ||
import { pipe } from './pipe'; | ||
describe('Test for keys', function () { | ||
@@ -10,7 +11,19 @@ it('should return keys of array', function () { | ||
describe('strict', function () { | ||
var actual = keys.strict({ 5: 'x', b: 'y', c: 'z' }); | ||
expect(actual).toEqual(['5', 'b', 'c']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
it('should return strict types', function () { | ||
var actual = keys.strict({ 5: 'x', b: 'y', c: 'z' }); | ||
expect(actual).toEqual(['5', 'b', 'c']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
}); | ||
it('should work with Partial in pipe', function () { | ||
var data = { | ||
foo: '1', | ||
bar: 7, | ||
}; | ||
var actual = pipe(data, keys.strict); | ||
expect(actual).toEqual(['foo', 'bar']); | ||
var result = true; | ||
expect(result).toEqual(true); | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "remeda", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A utility library for JavaScript and Typescript.", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
@@ -6,4 +6,5 @@ Remeda | ||
![GitHub CI](https://img.shields.io/github/workflow/status/remeda/remeda/CI/master?label=github-ci) | ||
![GitHub CI](https://img.shields.io/github/actions/workflow/status/remeda/remeda/ci.yml?branch=master&label=github-ci) | ||
[![Travis CI](https://img.shields.io/travis/remeda/remeda/master?label=travis-ci)](https://travis-ci.org/remeda/remeda) | ||
[![Codecov](https://img.shields.io/codecov/c/github/remeda/remeda/master)](https://codecov.io/gh/remeda/remeda) | ||
[![NPM](https://img.shields.io/npm/v/remeda)](https://www.npmjs.org/package/remeda) | ||
@@ -10,0 +11,0 @@ ![Dependencies](https://img.shields.io/librariesio/release/npm/remeda) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
713779
16314
162