UNPKG

ember-app-scheduler

Version:

Ember addon to schedule work at different phases of app life cycle.

22 lines (15 loc) 467 B
/** * Checks if the object is a primitive */ function isPrimitive(value) { // Using switch fallthrough because it's simple to read and is // generally fast: http://jsperf.com/testing-value-is-primitive/5 switch (typeof value) { case "string": case "number": case "boolean": return true; } return value == null; } module.exports = isPrimitive;