Code Monkey home page Code Monkey logo

find-images's Introduction

Find Images npm Package

Searching for images by resolution and size for Node.js

It's synchronous flexible module for relatively small tasks.

Installation

npm install find-images

API

FindImages(input[, resolution, size_limit])

input

Type: String | Array
Could be a path to images folder or an array of images

resolution

Type: String
Default: 100%x100%
Searching for images with this resolution. To ignore width or height, just set it's value as a percentage: 100%x250. To skip this option leave it empty '' or set it to null.

size_limit

Type: Number
Filter results by size (in KB)

Usage

const FindImages = require('find-images');

let results = FindImages(input, '540x100%', 500);
// => [{ path: '/test/540x180.jpg', resolution: '540x180', size: '70.08' }]

Output format

[
   {
      path: '/test/540x180.jpg',
      resolution: '540x180',
      size: '70.08' 
   },
]

Changelog

v2.0.0 (2019-02-16):

  • updated for new version of ReadDirRec
  • removed async method

v1.0.8 (2018-10-03):

  • fixed bug, when size string was extracted with space

v1.0.5 (2018-05-14):

  • fixed crash due to an unsupported file type error

find-images's People

Contributors

tpkn avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.