1. ES6 .includes()
:
var S = "fullweb";
S.includes("web");
2. RegExp .search()
:
// Mocked Service | |
angular.module('mock.users', []). | |
factory('UserService', function($q) { | |
var userService = {}; | |
userService.get = function() { | |
return { | |
id: 8888, | |
name: "test user" | |
} |
app.directive('rmHold', ['$timeout', function($timeout) { | |
return { | |
restrict: 'A', | |
link: function(scope, elem, attrs) { | |
var isActive = false; | |
var currentTimeout = null; | |
var startCoords = { | |
x: null, | |
y: null | |
} |
/** | |
* Provides requestAnimationFrame in a cross browser way. | |
* @author paulirish / http://paulirish.com/ | |
*/ | |
if ( !window.requestAnimationFrame ) { | |
window.requestAnimationFrame = ( function() { | |
return window.webkitRequestAnimationFrame || |
"use client" | |
import { WithSidebar } from "@/components/with-sidebar" | |
export const Dashboard = () => { | |
return ( | |
<WithSidebar | |
sidebarContent={SidebarContent} | |
mobileDashboardHeader={CustomHeader}> | |
<div className="p-10"> |