@shopify/predicates
A set of common JavaScript predicates
Last updated a month ago by shopify-dep .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @shopify/predicates 
SYNC missed versions from official npm registry.

@shopify/predicates

Build Status License: MIT npm version

A set of common JavaScript predicates. The functions in this library either take one input and return true/false, or return a customized function that does so.

Installation

$ yarn add @shopify/predicates

API

Predicates

  • isPositiveNumericString Returns true when its input is a positive numeric string and false otherwise.
  • isNumericString Returns true when its input is a numeric string and false otherwise.
  • isEmpty Returns true when its input is null, undefined, or has length 0.
  • isEmptyString Returns true when it's input is an empty string or contains only whitespace.
  • notEmpty Returns true when its input is not null, undefined or has length 0.
  • notNumericString Returns true when its input is not a numeric string and false otherwise.

Predicate creators

  • lengthMoreThan Given a number, returns a function that returns true when that input has length more than that number and false otherwise.
  • lengthLessThan Given a number, returns a function that returns true when that input has length less than that number and false otherwise.

Helpers

  • not Given a function that returns a boolean, returns a function that returns a boolean in the opposite cases.

Current Tags

  • 1.2.6                                ...           latest (a month ago)
  • 0.0.2-sknext-beta.2                                ...           next (4 days ago)

11 Versions

  • 0.0.2-sknext-beta.2                                ...           4 days ago
  • 0.0.1-sknext-beta.1                                ...           4 days ago
  • 1.2.6                                ...           a month ago
  • 1.2.5                                ...           6 months ago
  • 1.2.4                                ...           7 months ago
  • 1.2.3                                ...           8 months ago
  • 1.2.2                                ...           9 months ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 28
Last Month 21
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |