Skip to content

Commit

Permalink
REACT155 constant is now true for react 15.5 or above
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos authored and ljharb committed Apr 12, 2017
1 parent f5f6001 commit 2f957af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/version.js
@@ -1,7 +1,10 @@
import React from 'react';

export const VERSION = React.version;

const [major, minor] = VERSION.split('.');

export const REACT013 = VERSION.slice(0, 4) === '0.13';
export const REACT014 = VERSION.slice(0, 4) === '0.14';
export const REACT15 = VERSION.slice(0, 3) === '15.';
export const REACT155 = VERSION.slice(0, 4) === '15.5';
export const REACT15 = major === '15';
export const REACT155 = REACT15 && +minor >= 5;

0 comments on commit 2f957af

Please sign in to comment.