search

Search a keyword through array and/or objects

MIT License

Downloads
428
Stars
9
Committers
4

Bot releases are hidden (Show)

search - Version 2.1.0 Latest Release

Published by SMAKSS 6 months ago

What's introduced

We are excited to announce several significant updates in this release, aimed at enhancing functionality, improving developer experience, and ensuring higher code quality. Below are the key changes included:

  • Enhanced Search Functionality: The search function has been updated to support an optional generic type. This enhancement allows for more precise type specification, improving code readability and maintainability.

  • Improved Type Completion with keys Array: We've made a significant update to the keys array, which is now an array of generic type keys. This change drastically improves type completion and reduces the likelihood of mistakes by ensuring that the keys are of the expected type.

  • New Testing Framework Integration: To further our commitment to code quality, we've integrated a comprehensive testing framework into our project. This addition, coupled with its integration into the CI workflow, means that we can now automatically verify the integrity and reliability of our codebase with each push, ensuring that any changes meet our high standards for quality.

This update happens thanks to @mlbonniec's efforts. Their contribution has been instrumental in bringing these enhancements to life. We deeply appreciate their hard work and dedication to improving our project.

We believe these updates will significantly improve your development workflow and look forward to your feedback.

What's Changed

New Contributors

Full Changelog: https://github.com/SMAKSS/search/compare/v2.0.1...v2.1.0

search - Final stable release for 2.0.1

Published by SMAKSS 10 months ago

search - Remove extra exports

Published by SMAKSS 10 months ago

search - Upgrade dependencies

Published by SMAKSS 10 months ago

search - Migrate to typescript and make new distribution files

Published by SMAKSS 11 months ago

🌟 Release Notes for @smakss/search - Version 2.0.0 🌟

Overview 📋

We are thrilled to announce the release of version X.Y.Z of our Search functionality. This update introduces significant improvements in code organization, readability, and documentation, making your search experience smoother and more efficient.

What's New 🆕

  • Modular Code Structure 📁: The search functionality has been divided into smaller, more manageable files (types.ts, utils.ts, searchLogic.ts, search.ts).
  • TypeScript Integration 🌐: Full conversion of the codebase to TypeScript, providing strong typing and reducing potential runtime errors.
  • Enhanced Readability 📖: Refactoring of existing code for greater clarity and readability.
  • JSDoc Documentation 📚: Comprehensive JSDoc comments have been added, offering detailed explanations and usage examples.
  • Utility Function Improvements ⚙️: Refinement of utility functions for more efficient and reliable operation.

Breaking Changes 💥

  • File Structure 🗂️: Functions are now distributed across multiple files. Users will need to update their import paths.
  • TypeScript Adoption 📘: The codebase is now in TypeScript, which may require changes in JavaScript projects.

Migration Guide 🚀

To migrate from a previous version, please consider the following steps:

  1. Update import statements to match the new file structure, e.g., import { search } from './search';.
  2. For JavaScript integration, ensure your build tooling supports TypeScript.
  3. Review your implementation for compatibility with the new TypeScript types and interfaces.

Examples 💡

Here's a quick example of how to use the new search functionality:

import search from './search';
import { SearchItem } from './types';

// Sample data
const items: SearchItem[] = [{ name: 'John Doe', age: 30 }, { name: 'Jane Smith', age: 25 }];

// Perform a search
const results = search({
  searchText: 'John',
  searchItems: items,
  keys: ['name'],
  include: true,
  exact: false
});

console.log(results); // Expected output: [{ name: 'John Doe', age: 30 }]

Feedback 📢

Your feedback is crucial to us. Please let us know if you encounter any issues or have suggestions for future improvements.

search - Upgrade dependencies

Published by SMAKSS 11 months ago

search - Fixing the functionality phase II

Published by SMAKSS 12 months ago

search - Fixing the functionality phase I

Published by SMAKSS 12 months ago

search - Migrate to typescript

Published by SMAKSS 12 months ago

search - chore: fix workflow and add CodeSandbox to readme

Published by SMAKSS almost 2 years ago

search -

Published by SMAKSS over 2 years ago

search -

Published by SMAKSS almost 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago

search -

Published by SMAKSS over 3 years ago